Open scytacki opened 12 years ago
I’m also seeing this. There’s a pull request to address this in #11.
Removing the option from the README doesn't really solve the problem.
Just add the following code to the bottom of application.rb
# Restore debug_rjs flag for use with prototype-rails
module ActionView
class Base
# Specify whether RJS responses should be wrapped in a try/catch block
# that alert()s the caught exception (and then re-raises it).
cattr_accessor :debug_rjs
@@debug_rjs = false
end
end
this appears to still be an issue for 3.1/3.2 version; adding @esb's suggested code to the application.rb
solves the issue, but its a bit of a hack seeing as that this code already exists in the gem: https://github.com/rails/prototype-rails/blob/master/lib/prototype-rails/on_load_action_view.rb#L7-L10
what gives?
it works use esb's way
I'm trying to move an app from 3.0 to 3.2. When I do so, I have to comment out the config.action_view.debug_rjs = true line otherwise I get this error:
~/.rvm/gems/ruby-1.9.3-p125@rigse/gems/actionpack-3.2.2/lib/action_view/railtie.rb:34:in
block (3 levels) in <class:Railtie>': undefined method
debug_rjs=' for ActionView::Base:Class (NoMethodError)looking at the prototype-rails code I don't see how the config.action_view.debug_rjs = true line could work because prototype-rails doesn't seem to create the debug_rjs method anywhere.