[Rails] Re: Action Variables Not Available In The View For A Specifi

Matt Bauer
Wed, 10 May 2006 18:10:04 -0000

It''s an order thing.

render  :layout => ''admin'' actually copies the instance
variables from
the controller for use in the template.  It''s actually a bit more
complicated than that but that''s the just.  In otherwards, at the time
the instance variables are copied to the template, your instance
variable @strOut does not exist and is not copied.  Just code your
method like:

def manage
   @strOut = "BLAH"
   render :action => ''admin''
end

and all should be good.


-Matt

--
Posted via http://www.ruby-forum.com/.