Only produces “hello”, not “world”.
Which is as designed, but how do I make it do what I want - namely,
set a variable in a class method, and have that variable available in
a view helper?
Only produces “hello”, not “world”.
Which is as designed, but how do I make it do what I want - namely,
set a variable in a class method, and have that variable available in
a view helper?
On Mar 2, 3:25 pm, jbc [email protected] wrote:
Only produces “hello”, not “world”.
Which is as designed, but how do I make it do what I want - namely,
set a variable in a class method, and have that variable available in
a view helper?
Only instance variables of the controller are copied across to the
view (your bar is an instance variable of the class). easiest way
would probably be to have an accessor method for it and then you can
do controller.bar in your view.
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs