Rails conditional request
Suppose we have two tables: "Items" and "Types". This relationship:
item belongs_to type
type has_many items
Also, there is a column in the Item table, name it "mark". What would the request be (in a Rails safe way, if possible) to extract all types from it. A table of types that have related items in the Items table with "tag"?
+2
source to share