Association Extensions and Conditions


#1

Hey,

I’m wondering whether the following ‘should’ work, but I’m just not
getting it right.

I have the following association on my model:

has_many :things do
def cool
find(:all, :conditions => { :cool => true })
end
end

Now, I want to be able to do the following:

Suitcase.things.find(:all, :conditions => { :date => Date.today }).cool

I get an error that Array does not have a ‘cool’ method.

Any ideas?

Thanks
Joerg


#2

I forgot to add that

Suitcase.things.cool

works though. Just not if I combine it with an additional find.