Created
August 31, 2016 06:51
-
-
Save anonymous/f3ad29681a8b765b7bf3593804011bc6 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 | |
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