I am setting an action variable in my PagesController such as:
render(:layout => “admin”)
@strOut = “STRING Variable Set From The MANAGE Action!”
And in the /views/pages/manage.rhtml view, I don?t have access to that
@strOut variable by trying to call it as: <%= @strOut %>
However, I am setting the same variable in another action in the
@strOut = “STRING Variable Set From The EDIT Action!”
… and I have full access to it in /views/pages/view.rhtml
The only difference in the actions being this:
render(:layout => “admin”) …in the manage action.
So, I want the manage action to use /views/layouts/admin.rhtml, and the
action to use /views/layouts/pages.rhtml.
I’m not sure if the layouts have anything to do with it but I really
know why that variable cannot be called from the view.