-
-
Save tbuehlmann/e24c1b6a73d0aca78f8fb82a5bd90c2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
... | |
... | |
include DeviseCustomParams | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#devise_custom_params.rb is in app/controllers | |
module DeviseCustomParams | |
extend ActiveSupport::Concern | |
included do | |
before_action :configure_permitted_parameters, if: :devise_controller? | |
end | |
protected | |
def configure_permitted_parameters | |
devise_parameter_sanitizer.permit(:sign_up, keys: [:student_id, :professor_id, :name]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment