Topic: searching through belongs_to relations
I have a Topic and a Post model, topics have many posts and posts belongs to a topic.
I would like to find all posts which topic name = 'xyz'. How could I do that?
those are my models attributes:
so I guess it would something like:
Post.find(:all,:conditions=> something with topic_id and topic.name )
thanx in advance