class Company < ActiveRecord::Base
has_many :addresses, :as => :addressable, :attributes => true
end
class Address < ActiveRecord::Base
belongs_to :addressable, :polymorphic => true
def foo
meh = addressable.name
meh << 'other string'
meh == addressable.name # true
end
end
Took me a minute to figure out what was going on, but apparently I have to
#dup addressable.name, otherwise I am modifying it. Produces odd results
when looping through a collection of addresses.
Is this normal behavior? Maybe it's because of attribute_fu plugin.