KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a Collection class which has many coins. I am trying to select collections which have more than two coins. Currently, I have no problem doing that through straight Ruby, but that's extremely inefficient. My current code: collections = Collection.all.select { |c| c.coins.count > 2 } How do I achieve that through a joins call with Arel? Thanks!
Tags (comma-separated)
Save Edits
Cancel