多くのアセットを持つ Brand モデルがあります。
class Brand < ActiveRecord::Base
attr_accessible :name, :logo1, :logo2, :colour1, :colour2, :prices_attributes
has_attached_file :logo1
has_attached_file :logo2
has_many :users
has_many :welcome_messages
has_many :silos
has_many :articles, :through => :silos
has_many :libraries
has_many :covers, :through => :libraries
has_many :products
has_many :prices, :through => :products, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :prices
end
各ブランドに割り当てられたすべてのアセットを簡単に取得する方法はありますか? それとも、それぞれのようなことをしなければなりませんbrand.articles.each do |article| ...
か?
乾杯!