Class: Admin::TrialExtensionsController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::TrialExtensionsController
- Defined in:
- app/controllers/admin/trial_extensions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/admin/trial_extensions_controller.rb', line 2 def create @account = Account.find_by_keyword(params[:account_id]) @account.reset_trial_expiration if @account.save redirect_to admin_account_path(@account) else flash[:error] = t("trial_extensions.show.invalid", :default => "The account's trial cannot be extended.") render "admin/accounts/show" end end |