aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/attribute_methods.rb
diff options
context:
space:
mode:
authorLeonel Galán <leonel@getstealz.com>2017-06-16 15:09:15 -0400
committerGitHub <noreply@github.com>2017-06-16 15:09:15 -0400
commit095036467e4e06e56452da94077500d428dd0eed (patch)
tree3443e6779bf5a1d0f73f3c6ceb5f22cdee12e303 /activemodel/lib/active_model/attribute_methods.rb
parent0804e58e1e6a52190a950f863622102b6b21ccb8 (diff)
parentb55cf266f9ccadf49276de230a8b0c2076f05202 (diff)
downloadrails-095036467e4e06e56452da94077500d428dd0eed.tar.gz
rails-095036467e4e06e56452da94077500d428dd0eed.tar.bz2
rails-095036467e4e06e56452da94077500d428dd0eed.zip
Merge branch 'master' into bug/filtered_parameters_class
Diffstat (limited to 'activemodel/lib/active_model/attribute_methods.rb')
-rw-r--r--activemodel/lib/active_model/attribute_methods.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb
index b5c0b43b61..b3b39bf7ae 100644
--- a/activemodel/lib/active_model/attribute_methods.rb
+++ b/activemodel/lib/active_model/attribute_methods.rb
@@ -68,9 +68,8 @@ module ActiveModel
CALL_COMPILABLE_REGEXP = /\A[a-zA-Z_]\w*[!?]?\z/
included do
- class_attribute :attribute_aliases, :attribute_method_matchers, instance_writer: false
- self.attribute_aliases = {}
- self.attribute_method_matchers = [ClassMethods::AttributeMethodMatcher.new]
+ class_attribute :attribute_aliases, instance_writer: false, default: {}
+ class_attribute :attribute_method_matchers, instance_writer: false, default: [ ClassMethods::AttributeMethodMatcher.new ]
end
module ClassMethods