2014-10-07 21:46:09 +00:00
|
|
|
class Users::RegistrationsController < Devise::RegistrationsController
|
2016-02-28 09:48:18 +00:00
|
|
|
before_action :configure_sign_up_params, only: [:create]
|
|
|
|
before_action :configure_account_update_params, only: [:update]
|
2015-11-03 12:56:50 +00:00
|
|
|
|
2014-10-07 21:46:09 +00:00
|
|
|
protected
|
|
|
|
|
2016-07-26 00:14:23 +00:00
|
|
|
def after_sign_up_path_for(resource)
|
|
|
|
signed_in_root_path(resource)
|
|
|
|
end
|
|
|
|
|
|
|
|
def after_update_path_for(resource)
|
|
|
|
signed_in_root_path(resource)
|
|
|
|
end
|
2015-11-03 12:56:50 +00:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2016-07-26 00:14:23 +00:00
|
|
|
def configure_sign_up_params
|
2016-09-21 17:22:40 +00:00
|
|
|
devise_parameter_sanitizer.permit(:sign_up, keys: [:name, :joinedwithcode])
|
2016-07-26 00:14:23 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def configure_account_update_params
|
2016-09-21 17:22:40 +00:00
|
|
|
devise_parameter_sanitizer.permit(:account_update, keys: [:image])
|
2016-07-26 00:14:23 +00:00
|
|
|
end
|
2014-10-07 21:46:09 +00:00
|
|
|
end
|