ruby on rails - how do I stop from rendering a file on a specific page -
i have footer renders in entire application. prevent happen in specific page.
= render "layouts/footer" thank in advance
in application controller set boolean variable true in application.html file
in application_controller.rb
before_action :set_value def set_value @value = true end in applicaion.html.erb file
<% if @value%> <%= render "layouts/footer" %> <% end %> then in spacific pages actions set value false footer not rendered.
def some_action @value = false end ruby-on-rails
No comments:
Post a Comment