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:
parent
428c0bd4ba
commit
cb8b0f4a5a
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
class_eval <<-ruby_eval, __FILE__, __LINE__ + 1
|
||||
def self.name
|
||||
"ActionView for #{controller.class}"
|
||||
end
|
||||
|
||||
def inspect
|
||||
"#<#{self.class.name}>"
|
||||
end
|
||||
def inspect
|
||||
"#<#{self.class.name}>"
|
||||
end
|
||||
ruby_eval
|
||||
|
||||
if controller.respond_to?(:_helpers)
|
||||
include controller._helpers
|
||||
|
|
Loading…
Reference in a new issue