diff --git a/lib/enumerated_attribute/integrations/active_record.rb b/lib/enumerated_attribute/integrations/active_record.rb index 04399f4..d3107df 100644 --- a/lib/enumerated_attribute/integrations/active_record.rb +++ b/lib/enumerated_attribute/integrations/active_record.rb @@ -71,7 +71,7 @@ def []=(attr_name, value); write_enumerated_attribute(attr_name, value); end def attribute=(attr_name, value); write_enumerated_attribute(attr_name, value); end module ClassMethods - def instantiate(record) + def instantiate(record, column_types = {}) object = super(record) self.enumerated_attributes.each do |k,v| unless object.has_attribute?(k) #only initialize the non-column enumerated attributes