metamaps--metamaps/app/controllers/users/registrations_controller.rb
Devin Howard 7d4da81272 Update code style automatically using rubocop gem (#563)
* install rubocop

* 1961 automatic rubocop fixes

* update rubocop.yml to ignore half of the remaining cops

* rubocop lint warnings

* random other warnings fixed
2016-07-26 08:14:23 +08:00

25 lines
660 B
Ruby

class Users::RegistrationsController < Devise::RegistrationsController
before_action :configure_sign_up_params, only: [:create]
before_action :configure_account_update_params, only: [:update]
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
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
end