Class: Saasaparilla::CreditCardController
Instance Method Summary
collapse
included, #require_current_billable
Instance Method Details
#edit ⇒ Object
9
10
11
|
# File 'app/controllers/saasaparilla/credit_card_controller.rb', line 9
def edit
end
|
#update ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'app/controllers/saasaparilla/credit_card_controller.rb', line 13
def update
begin
if @subscription.credit_card.update_attributes(params[:credit_card])
flash[:notice] = "Your credit card was successfully updated."
redirect_to subscription_path
else
render :action => "edit"
flash[:error] = "Your credit card could not be updated due to errors. Please review the form and correct them."
end
rescue Exception => e
flash[:error] = e.message
render :action => "edit"
flash.discard
end
end
|