On 4 Dec 2008, at 14:28, Jay Mark wrote:
>
> class Author < ActiveRecord::Base
> has_many :books
>
> def author_age
> Author.find :all, (:conditions => ["age = ?", params[:authors]])
> end
>
> end
>
> What I want to do is to display all author's name base on the selected
> age.
>
> please, What is wrong with my query?
>
because hashes are written with {} not () (and in fact you don't even
need the {} here)
Fred
> Thanks
> Cypray
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---