Ruby on Rails: instance & class variables not maintaining value in controller

Posted by DerNalia on Stack Overflow See other posts from Stack Overflow or by DerNalia
Published on 2010-06-15T17:29:10Z Indexed on 2010/06/15 17:32 UTC
Read the original article Hit count: 197

Filed under:

at the top of my controller, outside of any method, I have

    @@javascript_is_disabled = false

and I have methods that that the view calls and invokes something like this

    @@javascript_is_disabled = params[:javascript_disabled]

but when I need the @@javascript_is_disabled in completely different method.. it is always false.

I know it changes in the method with params args... cause those methods behave differently, and appropriately

And ideas?

© Stack Overflow or respective owner

Related posts about ruby-on-rails