我正在尝试创建一个下拉选择框,用于与ActiveScaffold进行多态关联.
我有:
class Award belongs_to :sponsorship,:polymorphic => :true end class Organization has_many :awards,:as => :sponsorship end class Individual has_many :awards,:as => :sponsorship end
尝试在awards_controller中创建选择下拉框时
有:
config.columns[:sponsorship].form_ui = :select
我收到以下错误:
ActionView::TemplateError
(uninitialized constant
Award::Sponsorship)
我不确定这是我做得不对或我正在尝试的事情
完成不直接支持AS.
非常感谢一些建议.