0

I need to do that for the sign_in page in the VIEWS FILE and not the controller because I'm using two different views for the sign in. I just need to disable the layout in one of these two pages. If I use the controller by adding the following:

render :layout => false 

Then it wont render it for both pages. That's why I need a way to do that in the views file.

Thank you.

1 Answer 1

3

Afaik you cannot disable the layout from within the view. The views are part of the rendered page and thus are call from within the layout already.

My suggestion is to create a second layout and decide which layout is to be rendered in the controller.

Rails Layout Guide

render layout: "special_layout" 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.