Class: Iugu::PlanController
- Inherits:
-
AccountSettingsController
- Object
- AccountSettingsController
- Iugu::PlanController
- Defined in:
- app/controllers/iugu/plan_controller.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
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 = current_user_account.account @account.change_plan(params[:plan]) get_index_data render 'iugu/plan/index' end |
#index ⇒ Object
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 = current_user_account.account get_index_data render 'iugu/plan/index' end |