I have this filter in my ApplicationController and would like to add this controller so that my contact us form is not behind authentication. Can I do something similar or is there another technique to accomplish this?
You could skip the before action if it's the contact controller, which would be something like: skip_before_action :authorize, if: -> { params[:controller] == 'contact_us/contacts' }
I have this filter in my ApplicationController and would like to add this controller so that my contact us form is not behind authentication. Can I do something similar or is there another technique to accomplish this?
before_action :authorize, unless: :devise_controller?