Association Extensions and Conditions


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

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

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

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

Any ideas?


I forgot to add that

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs