application_controller.rb 504 B

12345678910111213141516
  1. class ApplicationController < ActionController::Base
  2. protect_from_forgery with: :exception
  3. before_action :configure_permitted_parameters, if: :devise_controller?
  4. before_action :masquerade_user!
  5. # before_action :authenticate_user!
  6. add_breadcrumb I18n.t("breadcrumbs.homepage"), :root_path
  7. protected
  8. def configure_permitted_parameters
  9. devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
  10. devise_parameter_sanitizer.permit(:account_update, keys: [:name])
  11. end
  12. end