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. # they are in AC.
if controller.class.respond_to?(:_helper_serial) if controller.class.respond_to?(:_helper_serial)
klass = @views[controller.class._helper_serial] ||= Class.new(self) do klass = @views[controller.class._helper_serial] ||= Class.new(self) do
const_set(:CONTROLLER_CLASS, controller.class)
# Try to make stack traces clearer # Try to make stack traces clearer
def self.name class_eval <<-ruby_eval, __FILE__, __LINE__ + 1
"ActionView for #{CONTROLLER_CLASS}" def self.name
end "ActionView for #{controller.class}"
end
def inspect def inspect
"#<#{self.class.name}>" "#<#{self.class.name}>"
end end
ruby_eval
if controller.respond_to?(:_helpers) if controller.respond_to?(:_helpers)
include controller._helpers include controller._helpers