Class: BillingsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- BillingsController
- Defined in:
- app/controllers/billings_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/billings_controller.rb', line 8 def edit @account = current_account @account.cardholder_name = @account.credit_card.cardholder_name @account.billing_email = @account.customer.email @account.expiration_month = @account.credit_card.expiration_month @account.expiration_year = @account.credit_card.expiration_year end |
#show ⇒ Object
5 6 |
# File 'app/controllers/billings_controller.rb', line 5 def show end |
#update ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/controllers/billings_controller.rb', line 17 def update @account = current_account if @account.save_customer_and_subscription!(params[:account]) redirect_to account_billing_path(@account), :notice => t('.update.notice', :default => "Billing information updated successfully") else render :edit end end |