Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tbuehlmann/e24c1b6a73d0aca78f8fb82a5bd90c2a to your computer and use it in GitHub Desktop.
Save tbuehlmann/e24c1b6a73d0aca78f8fb82a5bd90c2a to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
...
...
include DeviseCustomParams
end
#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