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.
|
# 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
|
||||||
|
|
Loading…
Reference in a new issue