re: multiple keys

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?

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')