aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/dynamic_matchers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/dynamic_matchers.rb')
-rw-r--r--activerecord/lib/active_record/dynamic_matchers.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb
index bbd8ca2377..9a7a8d25bb 100644
--- a/activerecord/lib/active_record/dynamic_matchers.rb
+++ b/activerecord/lib/active_record/dynamic_matchers.rb
@@ -75,14 +75,14 @@ module ActiveRecord
"#{finder}(#{attributes_hash})"
end
- # The parameters in the signature may have reserved Ruby words, in order
- # to prevent errors, we start each param name with `_`.
+ # The parameters in the signature may have reserved Ruby words, in order
+ # to prevent errors, we start each param name with `_`.
def signature
attribute_names.map { |name| "_#{name}" }.join(", ")
end
- # Given that the parameters starts with `_`, the finder needs to use the
- # same parameter name.
+ # Given that the parameters starts with `_`, the finder needs to use the
+ # same parameter name.
def attributes_hash
"{" + attribute_names.map { |name| ":#{name} => _#{name}" }.join(",") + "}"
end