Querying using Ruby on Rails

Hey,

In Rails you rarely need to use find_by_sql.

You can easily do things like this with
   Author.find_by_name(username)

Why don't read a bit more about ActiveRecord and Rails in general?

Cheers,
Yuri

Or...

Author.find(:all, :conditions => {:username => @username })
replace :all, for :first if needed.

Zach Inglis
→ Blog — http://www.zachinglis.com
→ Company — http://www.lt3media.com
→ Portfolio — http://portfolio.zachinglis.com