Skip to content

Instantly share code, notes, and snippets.

@karuna24s
Created October 24, 2016 13:05
Show Gist options
  • Save karuna24s/02e5b713a69e73dc3bacb0ba1f2dd20b to your computer and use it in GitHub Desktop.
Save karuna24s/02e5b713a69e73dc3bacb0ba1f2dd20b to your computer and use it in GitHub Desktop.
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