I’m trying to render from a pnr controller to the index of a web_services and I need to specify a layout as well.
I tried:
render :layout => "admin", :action => "web_services/index"
render :layout => "admin", :"web_services/index"
render :layout => "admin", :controller => "web_services", :action => "index"
and nothing works.
What should I use?
RESOLVED
DONE!
I had to use:
redirect_to :layout => "admin", :controller => 'web_services', :action => 'index'
The
:layoutoption forredirect_tois meaningless as redirect only needs a path and a status, and layout is just a name of the template. Also, as the name implies,redirect_todoesn’t render anything, it tells the browser to go to another page. I suggest you to read the RoR guides at guides.rubyonrails.org.