Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.action_view.debug_rjs #10

Open
scytacki opened this issue Mar 30, 2012 · 4 comments
Open

config.action_view.debug_rjs #10

scytacki opened this issue Mar 30, 2012 · 4 comments

Comments

@scytacki
Copy link

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 methoddebug_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.

@codyrobbins
Copy link

I’m also seeing this. There’s a pull request to address this in #11.

@esb
Copy link

esb commented Jan 3, 2013

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

@Lordnibbler
Copy link

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?

@waterman112
Copy link

it works use esb's way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants