Add admin user confirm column

This commit is contained in:
Rei
2014-04-12 16:38:31 +08:00
parent 10bc72acc2
commit db61511517
4 changed files with 24 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def update
if @user.update_attributes params.require(:user).permit(:name, :username, :email, :bio, :avatar, :remove_avatar)
if @user.update_attributes params.require(:user).permit(:name, :username, :email, :confirmed, :bio, :avatar, :remove_avatar)
flash[:success] = I18n.t('admin.users.flashes.successfully_updated')
redirect_to admin_user_url(@user)
else

View File

@@ -33,6 +33,11 @@
.form-group
= f.label :email
= f.text_field :email, class: 'form-control', tabIndex: 3
.form-group
.checkbox
label
= f.check_box :confirmed
= t '.confirmed'
.form-group
= f.label :bio
= f.text_area :bio, class: 'form-control', tabIndex: 4