aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-24 02:58:38 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-24 03:10:07 +0900
commitfd6648d5979df6e6daf9fa7eb1d01cd87922ae32 (patch)
treee64e33fb5aad9ecfd679cb7faf828d794f705c0f /activerecord/lib/active_record/associations
parentdf35204ed190086ec95b308ac1764571344005a6 (diff)
downloadrails-fd6648d5979df6e6daf9fa7eb1d01cd87922ae32.tar.gz
rails-fd6648d5979df6e6daf9fa7eb1d01cd87922ae32.tar.bz2
rails-fd6648d5979df6e6daf9fa7eb1d01cd87922ae32.zip
Rename local variable `n` to `name`
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/builder/belongs_to.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb
index 03da67f73e..321ccba918 100644
--- a/activerecord/lib/active_record/associations/builder/belongs_to.rb
+++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb
@@ -74,11 +74,11 @@ module ActiveRecord::Associations::Builder # :nodoc:
def self.add_touch_callbacks(model, reflection)
foreign_key = reflection.foreign_key
- n = reflection.name
+ name = reflection.name
touch = reflection.options[:touch]
callback = lambda { |changes_method| lambda { |record|
- BelongsTo.touch_record(record, record.send(changes_method), foreign_key, n, touch, belongs_to_touch_method)
+ BelongsTo.touch_record(record, record.send(changes_method), foreign_key, name, touch, belongs_to_touch_method)
}}
if reflection.counter_cache_column