the copy paste is strong

This commit is contained in:
Yuki 2015-09-01 18:48:56 +05:30
parent becfced2d9
commit 8cbd85a89c
1 changed files with 13 additions and 12 deletions

View File

@ -175,18 +175,19 @@ class Ajax::ModerationController < ApplicationController
@checked = status @checked = status
case params[:type].downcase case params[:type].downcase
when 'blogger' when 'blogger'
target_user.blogger = status target_user.blogger = status
when 'contributor' when 'contributor'
target_user.contributor = status target_user.contributor = status
when 'translator' when 'translator'
target_user.translator = status target_user.translator = status
when 'supporter' when 'supporter'
target_user.translator = status target_user.supporter = status
when 'moderator' when 'moderator'
target_user.translator = status target_user.moderator = status
when 'admin' when 'admin'
target_user.translator = status target_user.admin = status
end
target_user.save! target_user.save!
@message = I18n.t('messages.moderation.privilege.checked', privilege: params[:type]) @message = I18n.t('messages.moderation.privilege.checked', privilege: params[:type])