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

Jeff Ward
Wed, 10 May 2006 18:13:14 -0000

Excellent, re-ordering them worked. Thanks very much.

--

Jeff



-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Matt Bauer
Sent: May 10, 2006 11:10 AM
To: rails@lists.rubyonrails.org
Subject: [Rails] Re: Action Variables Not Available In The View For A
Specifi

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/.
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org