Jonathan Bradley wrote:> I''m trying to find some videos from a table by the columns
comedy_type and
> round. I tried the following with no luck
>
>
>
> current_contest.videos.find(:round => 1, :comedy_type => 1, :limit
=> 6,
> :order => "rank ASC")
>
>
>
> any ideas?
>
>
>
You need to pass arguments in the same fashion as you would a normal find, so...
current_contest.videos.find(:all, :conditions => ''round = 1 and
comedy_type = 1'', :limit => 6, :order => ''rank
ASC'')
--
http://www.5valleys.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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---