I am using the devise gem for authentication in my rails app. I would like to be able to hide my navbar partial if user is on a specific devise action and view. For example if user is currently in devise sessions new, I would like to hide my navbar partial. How would I accomplish this?
Thanks a lot in advance!
You can use devise_controller?
helper. Docs
<%= if devise_controller? %>
<!-- show partial -->
<% end %>
If you want to check for specific controller, use request.controller
<%= if request.controller == 'devise/registrations' %>
<!-- show partial -->
<% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With