diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-02-21 15:25:49 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-21 15:25:49 +0900 |
commit | a7cce501af8e5cb36bcc0a93da10e952d81884dc (patch) | |
tree | 719c6a3b033ddf6abc98863fcd72a4e904492301 | |
parent | 9c9c950d02af83742a5f76302d0faa99508f242c (diff) | |
parent | 0fecd266257db4c191973eea2c9ccaa83cae8a9c (diff) | |
download | rails-a7cce501af8e5cb36bcc0a93da10e952d81884dc.tar.gz rails-a7cce501af8e5cb36bcc0a93da10e952d81884dc.tar.bz2 rails-a7cce501af8e5cb36bcc0a93da10e952d81884dc.zip |
Merge pull request #35345 from soartec-lab/fix_lint_activerecord_relation
Fix lint `ShadowingOuterLocalVariable`
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 3566a57ddc..5563dfb6c9 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -1157,9 +1157,9 @@ module ActiveRecord order_args.map! do |arg| case arg when Symbol - field = arg.to_s - arel_column(field) { - Arel.sql(connection.quote_table_name(field)) + arg = arg.to_s + arel_column(arg) { + Arel.sql(connection.quote_table_name(arg)) }.asc when Hash arg.map { |field, dir| |