aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/dynamic_matchers.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-30 17:52:05 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-30 18:32:41 +0900
commitc1ff1392dbcd8fbf9228d552cf596a26351b2edc (patch)
treee454c434dd8f323c2765469e114da4fdf796d302 /activerecord/lib/active_record/dynamic_matchers.rb
parent83f7c25dfc441945dfc9eaab7e7880da24d3c026 (diff)
downloadrails-c1ff1392dbcd8fbf9228d552cf596a26351b2edc.tar.gz
rails-c1ff1392dbcd8fbf9228d552cf596a26351b2edc.tar.bz2
rails-c1ff1392dbcd8fbf9228d552cf596a26351b2edc.zip
Fix rubocop offences
Diffstat (limited to 'activerecord/lib/active_record/dynamic_matchers.rb')
-rw-r--r--activerecord/lib/active_record/dynamic_matchers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb
index 2c941b0008..398a029068 100644
--- a/activerecord/lib/active_record/dynamic_matchers.rb
+++ b/activerecord/lib/active_record/dynamic_matchers.rb
@@ -49,9 +49,9 @@ module ActiveRecord
attr_reader :model, :name, :attribute_names
- def initialize(model, name)
+ def initialize(model, method_name)
@model = model
- @name = name.to_s
+ @name = method_name.to_s
@attribute_names = @name.match(self.class.pattern)[1].split("_and_")
@attribute_names.map! { |name| @model.attribute_aliases[name] || name }
end