Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide footer layout on a particular page?

On my view page, I want to hide the footer partial that is defined in my application.html.erb, how can I do this?

what options do I have to do this?

like image 270
Blankman Avatar asked Feb 27 '11 02:02

Blankman


1 Answers

The easiest/quickest way would probably be to define a conditional:

<%= render "layouts/footer" unless @skip_footer %>

and then set the variable as necessary in your actions:

def non_footer_action
  do_stuff
  @skip_footer = true
end
like image 157
Michelle Tilley Avatar answered Nov 14 '22 20:11

Michelle Tilley