More rubyish finders

Posted by Colin A. Bartlett Wed, 17 Oct 2007 18:37:00 GMT

I just came across this little plugin which seems to make the writing of ActiveRecord finders much more rubyesque.

query = User.find do
    name = persons_name?
end

Definitely seems nicer then:

User.find(:conditions=>["name=?",persons_name])
Trackbacks

Use the following link to trackback from your own site:
http://blog.kineticweb.com/articles/trackback/66

Comments

Leave a response

Comments