aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-08-04 18:58:18 +0200
committerJosé Valim <jose.valim@gmail.com>2010-08-04 14:44:34 -0300
commit84f0a0bc30df58e1edfd09fdde2de891e4577321 (patch)
tree9ae43e050fa94d61378927d277c9c8d61bc53d00 /activesupport
parent462666b73717333d460684339c6f6ce07475f713 (diff)
downloadrails-84f0a0bc30df58e1edfd09fdde2de891e4577321.tar.gz
rails-84f0a0bc30df58e1edfd09fdde2de891e4577321.tar.bz2
rails-84f0a0bc30df58e1edfd09fdde2de891e4577321.zip
Reload action_methods in AbstractController after defining new method.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/callbacks.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 1c7802f7de..0fafd56f33 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -419,7 +419,10 @@ module ActiveSupport
@_keyed_callbacks ||= {}
@_keyed_callbacks[name] ||= begin
str = send("_#{kind}_callbacks").compile(name, object)
- class_eval "def #{name}() #{str} end", __FILE__, __LINE__
+ class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
+ def #{name}() #{str} end
+ protected :#{name}
+ RUBY_EVAL
true
end
end