Reputation: 15374
Is there a way of rendering different shared footers in rails, so for example i would like one footer for the homepage and then a different footer throughout the site.
has anyone done this before? i was thinking that an if statement would work depending upon the page viewed? not sure if this is correct
Any help appreciated
Upvotes: 0
Views: 58
Reputation: 51156
If you had the following layouts:
You'd just specify the layout in your homepage controller as in
class HomeController < ApplicationController
layout 'home'
#everything else follows...
end
The rest of your views will use the default, which is application.html.erb
.
Upvotes: 1