Skip to content Skip to sidebar Skip to footer
Showing posts with the label Has Many

Rails3 Activerecord - Fetching All Records That Have A And B (through A Has_many Relationship)

I have the following model relationships: class Article :article_tags end class ArticleTag Solutio… Read more Rails3 Activerecord - Fetching All Records That Have A And B (through A Has_many Relationship)

How To Display Highest Rated Albums Through A Has_many Reviews Relationship

I'm setting up a simple ruby/rails app where users can review albums. On an album's show pa… Read more How To Display Highest Rated Albums Through A Has_many Reviews Relationship

How To Count MySQL Results In A Has-many-through Relation

There is pretty good article how to filter results in a has-many relation: How to filter SQL result… Read more How To Count MySQL Results In A Has-many-through Relation