Skip to content

Commit

Permalink
Add _default_attributes to acts_as_ar_model
Browse files Browse the repository at this point in the history
_default_attributes is a set of default attributes for the internal API
of ActiveRecord models added in 5.0.1.
  • Loading branch information
chrisarcand committed Jan 4, 2017
1 parent 50f6f24 commit fcf5dbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/acts_as_ar_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def attribute_types
@attribute_types ||= Hash.new(ActiveModel::Type::Value.new)
end

def _default_attributes
@default_attributes ||= ActiveRecord::AttributeSet.new({})
end

def attribute_names
load_schema
attribute_types.keys
Expand Down

0 comments on commit fcf5dbd

Please sign in to comment.