Sha256: c8c52fe7aa83ffd70930a736709a5118cd0fa39bb2fbe5c24555d14cbe636280
Contents?: true
Size: 502 Bytes
Versions: 6
Compression:
Stored size: 502 Bytes
Contents
class UsersController < ApplicationController before_action { |c| c.authorize_level(Snapuser.can_edit) } layout Snapuser.layout def edit @user = current_user end def update @user = current_user if @user.update_attributes(user_params) sign_in @user redirect_to profile_path, success: t('snapuser.edit.success') else render 'new' end end private def user_params params.require(:user).permit(:name, :password, :password_confirmation) end end
Version data entries
6 entries across 6 versions & 1 rubygems