diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-15 13:35:22 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-15 13:35:22 -0700 |
commit | cb8b0f4a5aac04a327a884b5413ccdb184715da8 (patch) | |
tree | 059cc9afb8a5baa69878416f9b5d7d4c5549e2ab /actionpack/lib/action_view | |
parent | 428c0bd4bae229ea94d3c5f1ffae299fc4803cb4 (diff) | |
download | rails-cb8b0f4a5aac04a327a884b5413ccdb184715da8.tar.gz rails-cb8b0f4a5aac04a327a884b5413ccdb184715da8.tar.bz2 rails-cb8b0f4a5aac04a327a884b5413ccdb184715da8.zip |
Make this less brittle and work on 1.8
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index b4c91a772f..58dae0bb0f 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -241,16 +241,16 @@ module ActionView #:nodoc: # they are in AC. if controller.class.respond_to?(:_helper_serial) klass = @views[controller.class._helper_serial] ||= Class.new(self) do - const_set(:CONTROLLER_CLASS, controller.class) - # Try to make stack traces clearer - def self.name - "ActionView for #{CONTROLLER_CLASS}" - end - - def inspect - "#<#{self.class.name}>" - end + class_eval <<-ruby_eval, __FILE__, __LINE__ + 1 + def self.name + "ActionView for #{controller.class}" + end + + def inspect + "#<#{self.class.name}>" + end + ruby_eval if controller.respond_to?(:_helpers) include controller._helpers |