From the book Agile Web Development With Rails
class Order < ActiveRecord::Base
named_scope :last_n_days, lambda { |days| {:conditions =>
[\'updat
Very cool. I was thinking of doing something like this in Javascript but Javascript behaves rather weird.
The statement:
var x = SomeObject;
does not call SomeObject's toString() function. But the statement:
var x;
x = SomeObject;
correctly calls the toString() function as expected.
This prevents Javascript from doing cool stuff with chaining. =(