Class: NimbleshopAuthorizedotnet::AuthorizedotnetsController
- Inherits:
-
Object
- Object
- NimbleshopAuthorizedotnet::AuthorizedotnetsController
- Defined in:
- app/controllers/nimbleshop_authorizedotnet/authorizedotnets_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_authorizedotnet/authorizedotnets_controller.rb', line 10 def update alert_msg = if @payment_method.update_attributes(post_params[:authorizedotnet]) 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 |