0

In a page I'm working on , i have overridden the application.html.erb because the layout is complex for pages like signup / login and some others.

So i created a new layout and I'm rendering it through the controller's action.

def new
  render :layout => '../path/newlayout.html.erb'
  ...
end

Question is , can i use another layout as a "secondary" application.html.erb?

Can i <%yield%> to the newlayout.html.erb ?

Ml Ck
  • 37
  • 7

1 Answers1

0

As i searched further , i stumbled upon partials!

just create a file with the naming convention "_login.html.erb" in the same folder as your newlayout.html.erb

and just use <%= render 'login' %>

in the same position and way that you'd use <%yield%>

Ml Ck
  • 37
  • 7