pluginaweek / enumerate_by

Adds support for declaring an ActiveRecord class as an enumeration
http://www.pluginaweek.org
MIT License
38 stars 9 forks source link

Frozen has_many enums? #3

Closed obrie closed 13 years ago

obrie commented 13 years ago

Emmanuel Nicolau opened this issue

@@@ ruby class Car < ActiveRecord::Base has_many :wheel_types end

class WheelType < ActiveRecord::Base enumerate_by :name

bootstrap( {:id => 1, :name => ’big’}, {:id => 2, :name => ’small’} ) end

Car.create.reload.wheel_types.frozen? => true @@@

This happens with has_many :through too.

original LH ticket

This ticket has 0 attachment(s).

obrie commented 13 years ago

rafaelasantafe (at yahoo.com) commented

same problem here... any news on this???

obrie commented 13 years ago

This should now be fixed by the following commit: http://github.com/pluginaweek/enumerate_by/commit/e417a3d2b63c5f3e8e64bc38ff23d6c85f911a98

Thanks for the report! (and sorry it took so long)