Is there a way in Rails to add a class to a html tag if the current page rendered a 404 error.
On a controller of mine, if a user visits the wrong website it renders a file in the public error with a 404 error like this
else
render file: 'public/error', status: 404, formats: [:html]
end
I want to add a class to my footer, hidden
, to hide the footer if this page is rendered. I've tried this with no luck (but it was more of a guess)
<%= "hidden" if current_page?(status: 404) %>
Any suggestions??