views:

342

answers:

0

I'm trying to create a drop-down select box for a polymorphic association with ActiveScaffold.

I have:

class Award
  belongs_to :sponsorship, :polymorphic => :true
end

class Organization
  has_many :awards, :as => :sponsorship
end

class Individual
  has_many :awards, :as => :sponsorship
end

While trying to create a select drop-down box in awards_controller with:

config.columns[:sponsorship].form_ui = :select

I get the following error:

ActionView::TemplateError (uninitialized constant Award::Sponsorship)

I'm not sure if it's something I'm not doing right or what I'm trying to accomplish not directly supported in AS.

Would really appreciate some advice.