Parked at Loopia - i'd like to get all of the graphics of a certain *category* (not theme) by specifying the category id, but none of the graphics are associated with a category_id, just a theme_id. I included a solution I wrote that works fine, but it looks incredibly ugly and there has to be a "cleaner" way. Any ideas?
Parked at Loopia - i'd like to get all of the graphics of a certain *category* (not theme) by specifying the category id, but none of the graphics are associated with a category_id, just a theme_id. I included a solution I wrote that works fine, but it looks incredibly ugly and there has to be a "cleaner" way. Any ideas?
Graphic.find(:all, :include => [:themes => :categories], :conditions => ["categories.id = ?", params[:id]])
Or something close to that.