Created
October 24, 2016 13:05
-
-
Save karuna24s/02e5b713a69e73dc3bacb0ba1f2dd20b 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 | |
protect_from_forgery with: :exception | |
before_action :configure_permitted_parameters, if: :devise_controller? | |
def after_sign_in_path_for(resource) | |
request.env['omniauth.origin'] || root_path | |
end | |
protected | |
def configure_permitted_parameters | |
devise_parameter_sanitizer.permit(:sign_up, keys: [:name]) | |
devise_parameter_sanitizer.permit(:account_update, keys: [:name]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment