Hi,
It seems that a polymorphic association "has_one" fails with models
like address, business..
here is an example:
class User < ActiveRecord::Base
attr_accessible :name, :age, :address_id
has_one :address, :as => :addressable
end
class Address < ActiveRecord::Base
attr_accessible :street, :postal, :city, :addressable_id, :addressable_type
belongs_to :addressable, :polymorphic => true
end
OUTPUT nothing:
Address: -
optional
Although, it works with has_many association:
attr_accessible :name, :age, :address_ids
has_many :addresses, :as => :addressable
Any ideas?
BR,
Kimerseen