You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- class Admins::IdentityVerificationsController < Admins::BaseController
- before_action :finder_identity_verification, except: [:index]
- def index
- params[:sort_by] = params[:sort_by].presence || 'created_at'
- params[:sort_direction] = params[:sort_direction].presence || 'desc'
- identity_verifications = Admins::IdentityVerificationQuery.call(params)
- @identity_verifications = paginate identity_verifications.preload(:user)
- end
-
- def show
- render 'edit'
- end
- def edit
- end
-
- def update
- if @identity_verification.update(update_params)
- redirect_to admins_identity_verifications_path
- flash[:success] = "更新成功"
- else
- redirect_to admins_identity_verifications_path
- flash[:danger] = "更新失败"
- end
- end
-
- private
- def finder_identity_verification
- @identity_verification = IdentityVerification.find(params[:id])
- @user = @identity_verification.user
- end
-
- def update_params
- params.require(:identity_verification).permit(:state, :description)
- end
- end
|