aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-10-25 17:12:19 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-10-25 17:12:19 -0700
commit89397d09ebb7ca4089f17820d05d5eb223913652 (patch)
treea3836aedbeba1670571ebe6cbc14b79c921c0068 /activesupport
parent450743cf56125d153b64c3509e75b0e4f86851d1 (diff)
downloadrails-89397d09ebb7ca4089f17820d05d5eb223913652.tar.gz
rails-89397d09ebb7ca4089f17820d05d5eb223913652.tar.bz2
rails-89397d09ebb7ca4089f17820d05d5eb223913652.zip
Prefix internal method with _
This will avoid naming clash with user defined methods
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/callbacks.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 45231bc101..24c702b602 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -78,7 +78,7 @@ module ActiveSupport
# save
# end
def run_callbacks(kind, &block)
- send "run_#{kind}_callbacks", &block
+ send "_run_#{kind}_callbacks", &block
end
private
@@ -730,7 +730,7 @@ module ActiveSupport
set_callbacks name, CallbackChain.new(name, options)
module_eval <<-RUBY, __FILE__, __LINE__ + 1
- def run_#{name}_callbacks(&block)
+ def _run_#{name}_callbacks(&block)
_run_callbacks(_#{name}_callbacks, &block)
end
RUBY