2014-10-07 21:46:09 +00:00
|
|
|
class Users::RegistrationsController < Devise::RegistrationsController
|
2015-11-03 12:56:50 +00:00
|
|
|
before_filter :configure_sign_up_params, only: [:create]
|
|
|
|
before_filter :configure_account_update_params, only: [:update]
|
|
|
|
|
2014-10-07 21:46:09 +00:00
|
|
|
protected
|
|
|
|
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
|
|
|
|
def configure_sign_up_params
|
|
|
|
devise_parameter_sanitizer.for(:sign_up) << [:name, :joinedwithcode]
|
|
|
|
end
|
|
|
|
|
|
|
|
def configure_account_update_params
|
|
|
|
puts devise_parameter_sanitizer_for(:account_update)
|
|
|
|
devise_parameter_sanitizer.for(:account_update) << [:image]
|
|
|
|
end
|
2014-10-07 21:46:09 +00:00
|
|
|
end
|