Answer the question
In order to leave comments, you need to log in
How to avoid loading application.html.haml view?
Good afternoon!
all internal pages of the site have a similar structure, i.e. the view part would be appropriate to place in application.html.haml.
What about pages that have a completely different structure?
You can make the view not load application.html.haml
Answer the question
In order to leave comments, you need to log in
guides.rubyonrails.org/layouts_and_rendering.html
Search in Conditional Layouts
Another option
class MyController < ApplicationController
layout :resolve_layout
# ...
private
def resolve_layout
case action_name
when "new", "create"
"some_layout"
when "index"
"other_layout"
else
"application"
end
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question