Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Topic
- has n, :article_topics
- has n, :articles, :through => :article_topics
- def associated_articles association_type
- Article.all :conditions => ["(`article_topics`.`association_type` = ?)", association_type]
- # I want to do this
- Article.all 'article_topics.association_type' => association_type
- # But DM complains that 'article_topics.association_type' is not a property
- # Design? or Bug?
- end
- end
Add Comment
Please, Sign In to add comment