mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-17 11:54:22 +01:00
[bug] deleting a coupon displays an error message
This commit is contained in:
parent
33e45fd536
commit
263b69dc8b
@ -7,6 +7,7 @@
|
||||
- Fix a bug: invalid link to the user's manual
|
||||
- Fix a bug: unable to sync coupons on stripe
|
||||
- Fix a bug: ignored coupon when booking an event with card payment
|
||||
- Fix a bug: deleting a coupon displays an error message
|
||||
|
||||
## v5.0.4 2021 June 15
|
||||
|
||||
|
@ -6,7 +6,7 @@ class Coupon < ApplicationRecord
|
||||
has_many :payment_schedule
|
||||
|
||||
after_create :create_gateway_coupon
|
||||
after_commit :delete_gateway_coupon, on: [:destroy]
|
||||
before_destroy :delete_gateway_coupon
|
||||
|
||||
validates :name, presence: true
|
||||
validates :code, presence: true
|
||||
|
@ -78,9 +78,10 @@ Rails.application.routes.draw do
|
||||
resources :prices, only: %i[index update] do
|
||||
post 'compute', on: :collection
|
||||
end
|
||||
resources :coupons
|
||||
post 'coupons/validate' => 'coupons#validate'
|
||||
post 'coupons/send' => 'coupons#send_to'
|
||||
resources :coupons do
|
||||
post 'validate', action: 'validate', on: :collection
|
||||
post 'send', action: 'send_to', on: :collection
|
||||
end
|
||||
|
||||
resources :trainings_pricings, only: %i[index update]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user