Class: Admin::TrialExtensionsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/admin/trial_extensions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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 (@account)
  else
    flash[:error] = t("trial_extensions.show.invalid",
                      :default => "The account's trial cannot be extended.")
    render "admin/accounts/show"
  end
end