class Agency < ActiveRecord::Base
has_many :events
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
attr_accessible :name, :email, :phone, :address, :city, :state, :zip,
:notes, :is_admin, :password, :password_confirmation, :remember_me
end
class Event < ActiveRecord::Base
belongs_to :agency
has_many :consumers
end
class Consumer < ActiveRecord::Base
belongs_to :event
end
consumer_controller に、代理店のフィールドを含めようとしています
active_scaffold :consumer do |conf|
list.columns = [
:agency, :event
]
end
このような関連付けがあります。代理店 -> イベント -> 消費者。また、エージェンシーと消費者の間には関係がなく、イベントを通じてのみ関係があります。
しかし、それはエラーを引き起こします。
任意のフィールド フォームの代理店テーブルを一覧表示するにはどうすればよいですか?