User.find(:all, :conditions => { :last_name => "Catlin",
:created_on_less_than => Time.now} ) #yours
Though, I added this "shortcut".
User.find_with(params[:user])
I don't think its worth adding new syntax to core to go from
User.find(:all, :conditions => params[:user]) to
User.find_with(params[:user]). The original method allows for a choice
between :first and :all as well as all the other options like :limit.
The sweetness of syntactic sugar is measured in saving x frequency. I
think that neither the saving nor the frequency of the query is enough
to warrant a new method.
I would look sympathetic to a patch that allowed for hash definitions
of :conditions, though. But I don't buy :created_on_less_than or other
ways of dealing with something else than equality through naming
conventions. If you need that kind of thing, use the strings.
--
David Heinemeier Hansson
http://www.loudthinking.com -- Broadcasting Brain
http://www.basecamphq.com -- Online project management
http://www.backpackit.com -- Personal information manager
http://www.rubyonrails.com -- Web-application framework
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core