For me, the CSS solution is the closest to the usual one:
app/controllers/resources_controller.rb
class ResourcesController < ApplicationController def action
app/views/layouts/application.html.erb
<body class="<%= "#{controller_path} #{action_name}" %>"> <footer></footer> </body>
app/assets/stylesheets/resources.css.scss
body.resources { // Hide footer for certain views &.action footer { display: none; } }
You can also use a separate layout for footerless actions, although one element is not a sufficient reason for another layout.
jibiel
source share