# Association Extensions and Conditions

**URL:** <https://www.ruby-forum.com/t/association-extensions-and-conditions/86045>\
**Category:** Rails\
**Created:** [February 19, 2007, 10:37am UTC](https://www.ruby-forum.com/t/association-extensions-and-conditions/86045 "2007-02-19T10:37:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joergd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@joergd](https://www.ruby-forum.com/u/joergd)\
**Post date:** [February 19, 2007, 10:37am UTC](https://www.ruby-forum.com/t/association-extensions-and-conditions/86045/1 "2007-02-19T10:37:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joergd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@joergd](https://www.ruby-forum.com/u/joergd)\
**Post date:** [February 19, 2007, 10:38am UTC](https://www.ruby-forum.com/t/association-extensions-and-conditions/86045/2 "2007-02-19T10:38:48Z")

</div>

I forgot to add that

Suitcase.things.cool

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