I am using find_by_sql because I get this error when I use find_by_name or find_all_by_name
"undefined method `find_by_name' for #<Class:" I get it again when I put in the code in the last post. Is there a way to solve the undefined method problem? Cypray Ryan Bigg wrote: > Stop using find_by_sql! > > You can just do: > > author = Author.find_by_name(params[:author][:name]) > books = author.books.find(:all, :select => "title") -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

