Class: NimbleshopStripe::StripesController
- Inherits:
-
Object
- Object
- NimbleshopStripe::StripesController
- Defined in:
- app/controllers/nimbleshop_stripe/stripes_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/nimbleshop_stripe/stripes_controller.rb', line 10 def update alert_msg = if @payment_method.update_attributes(post_params[:stripe]) msg = "Record has been updated" %Q[alert("#{msg}")] else msg = @payment_method.errors..first %Q[alert("#{msg}")] end respond_to do |format| format.js { render js: alert_msg } end end |