hubfeenix.fi/app/controllers/application_controller.rb

14 lines
335 B
Ruby
Raw Normal View History

2022-11-21 11:10:04 +01:00
class ApplicationController < ActionController::Base
2022-12-20 16:29:05 +01:00
before_action :configure_permitted_parameters, if: :devise_controller?
2023-01-15 20:50:58 +01:00
include Pundit::Authorization
2022-12-20 16:29:05 +01:00
2023-01-15 20:50:58 +01:00
alias :current_user :current_member #for pundit
protected
def configure_permitted_parameters
2022-12-20 16:29:05 +01:00
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
2023-01-15 20:50:58 +01:00
end
2022-11-21 11:10:04 +01:00
end