Class: Iugu::PlanController

Inherits:
AccountSettingsController
  • Object
show all
Defined in:
app/controllers/iugu/plan_controller.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/iugu/plan_controller.rb', line 10

def change
  return unless params[:plan]
  params[:id] ? @account = current_user.accounts.find(params[:id]) : @account = .

  @account.change_plan(params[:plan])

  get_index_data
  render 'iugu/plan/index'
end

#indexObject



4
5
6
7
8
# File 'app/controllers/iugu/plan_controller.rb', line 4

def index
  params[:id] ? @account = current_user.accounts.find(params[:id]) : @account = .
  get_index_data
  render 'iugu/plan/index'
end