1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make this less brittle and work on 1.8

This commit is contained in:
Yehuda Katz 2009-10-15 13:35:22 -07:00
parent 428c0bd4ba
commit cb8b0f4a5a

View file

@ -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
class_eval <<-ruby_eval, __FILE__, __LINE__ + 1
def self.name
"ActionView for #{CONTROLLER_CLASS}"
"ActionView for #{controller.class}"
end
def inspect
"#<#{self.class.name}>"
end
ruby_eval
if controller.respond_to?(:_helpers)
include controller._helpers