Class: PlansController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/plans_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



8
9
10
11
# File 'app/controllers/plans_controller.rb', line 8

def edit
  @plans = Plan.ordered
  @account = 
end

#indexObject



4
5
6
# File 'app/controllers/plans_controller.rb', line 4

def index
  @plans = Plan.ordered
end

#updateObject



13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/plans_controller.rb', line 13

def update
  @plans = Plan.ordered
  @account = 
  Saucy::Configuration.notify("plan_upgraded", :account => @account,
                                               :request => request)
  if @account.save_customer_and_subscription!(params[:account])
    redirect_to (@account), :notice => t('.update.notice', :default => "Plan changed successfully")
  else
    render :edit
  end
end