aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-12-13 08:46:12 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-12-13 08:46:12 -0200
commitcff0e51ae946a2edc0216fb29c1496109c247d68 (patch)
tree1965313d84b6a5113a017f640620ee4ca002f0b3 /actionpack/lib/abstract_controller
parent85741dd1750fe5cb68e04b876ea61f6065982ac2 (diff)
downloadrails-cff0e51ae946a2edc0216fb29c1496109c247d68.tar.gz
rails-cff0e51ae946a2edc0216fb29c1496109c247d68.tar.bz2
rails-cff0e51ae946a2edc0216fb29c1496109c247d68.zip
Refactor helpers code in Action Pack a bit
* Avoid calling class_eval when not needed * Remove helpers_path attr accessor, it's defined as a class attribute a few lines later * Avoid creating extra arrays when finding helpers, use flat_map and sort! * Remove not required refer variable when redirecting :back
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r--actionpack/lib/abstract_controller/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb
index d4e73bf257..36a0dcb2de 100644
--- a/actionpack/lib/abstract_controller/helpers.rb
+++ b/actionpack/lib/abstract_controller/helpers.rb
@@ -19,7 +19,7 @@ module AbstractController
def inherited(klass)
helpers = _helpers
klass._helpers = Module.new { include helpers }
- klass.class_eval { default_helper_module! unless anonymous? }
+ klass.class_eval { default_helper_module! } unless klass.anonymous?
super
end