How to visualize a template and layout?

In the controller method, how can you visualize the template and layout?

Same:

def new
  render :template => 'devise/invitations/new', :layout => 'application_unauthorized2_t2' 
end
+3
source share
2 answers

Instead of just being a parameter hash, like most rails methods, the render method is a series of arguments, the last of which is a parameter hash. The first argument to render is a template, like a string. You do not need to include it in the hash parameters.

Just do the following:

def new
  render 'devise/invitations/new', :layout => 'application_unauthorized2_t2' 
end
+8
source

All Articles