how to remove header and footer from some of the pages in ruby on rails
ruby, ruby-on-rails
Solution
Controllers support `:only` and `:except` options for layouts, see the Conditional layouts section in this guide.
So you can do the following in your controller:
class SomeController < ApplicationController
layout 'application', :except => [:some_action, :some_other_action]
...
Problem
I am working in rails project. I created a header and footer and added to all pages in layouts/application.html.erb file. Now I want to remove it from some pages. how can I do that?