UX: Nicer selection of suspend duration

This commit is contained in:
Robin Ward
2017-09-13 16:44:47 -04:00
parent 677b016387
commit 6bce3004d9
14 changed files with 51 additions and 43 deletions

View File

@@ -53,7 +53,7 @@ class Admin::UsersController < Admin::AdminController
def suspend
guardian.ensure_can_suspend!(@user)
@user.suspended_till = params[:duration].to_i.days.from_now
@user.suspended_till = params[:suspend_until]
@user.suspended_at = DateTime.now
message = params[:message]