I get an error when my route is indicated as such:
resources :coupons get 'coupons/redeem_coupon', to: 'coupons#redeem_coupon', as: 'redeem_coupon'
Error:
ActiveRecord::RecordNotFound - Couldn't find Coupon with 'id'=redeem_coupon:
When I cancel the order:
get 'coupons/redeem_coupon', to: 'coupons#redeem_coupon', as: 'redeem_coupon' resources :coupons
It works great. I understand that resources create these routes.
GET /coupons GET /coupons/new POST /coupons GET /coupons/:id GET /coupons/:id/edit PATCH/PUT /coupons/:id DELETE /coupons/:id
Is enumerating my custom route the first, more specific, or overriding another route? Why does order matter?
source share