Sha256: c7e2fefc6a35f31b38347e8ce52657f69c9c94d6a2abd4219706ec8485686460

Contents?: true

Size: 578 Bytes

Versions: 27

Compression:

Stored size: 578 Bytes

Contents

module EgovUtils
  class CurrentUsersController < ApplicationController
    before_action :require_login

    def edit; end

    def update
      current_user.update(update_params)

      if current_user.valid?
        redirect_to edit_current_user_path, notice: t('activerecord.successful.messages.updated', model: User.model_name.human)
      else
        render :edit
      end
    end

    private

    def update_params
      params
        .require(:user)
        .permit(:email, :password, :password_confirmation, :firstname,
                :lastname)
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha15 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha14 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha13 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha12 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha11 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha10 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha9 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha8 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha7 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha6 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha5 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha4 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.4.5 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.4.4 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha3 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha2 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.5.0.alpha1 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.4.3 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.4.2 app/controllers/egov_utils/current_users_controller.rb
egov_utils-1.4.1 app/controllers/egov_utils/current_users_controller.rb