Skip to content

Commit

Permalink
Rails 4; permit 2 arguments to ActiveRecord::Persistence::ClassMethod…
Browse files Browse the repository at this point in the history
…s. Supports jeffp#66
  • Loading branch information
Rob Chekaluk committed Feb 23, 2014
1 parent 33c4ab6 commit 524f2f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/enumerated_attribute/integrations/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 524f2f1

Please sign in to comment.