Re-order Conference Associations
The current order leads to an error on the route
GET /conferences/:short_name/physical_tickets
The Rails error message was rather helpful! 😁
```
Completed 500 Internal Server Error in 35ms (ActiveRecord: 12.0ms)
ActiveRecord::HasManyThroughOrderError (Cannot have a has_many :through association 'Conference#physical_tickets' which goes through 'Conference#ticket_purchases' before the through association is defined.):
app/controllers/admin/physical_tickets_controller.rb:11:in `index'
```
This commit is contained in:
parent
2a0c19b0e8
commit
1f7877ccd9
1 changed files with 1 additions and 1 deletions
|
|
@ -25,8 +25,8 @@ class Conference < ApplicationRecord
|
|||
has_one :email_settings, dependent: :destroy
|
||||
has_one :program, dependent: :destroy
|
||||
has_one :venue, dependent: :destroy
|
||||
has_many :physical_tickets, through: :ticket_purchases
|
||||
has_many :ticket_purchases, dependent: :destroy
|
||||
has_many :physical_tickets, through: :ticket_purchases
|
||||
has_many :payments, dependent: :destroy
|
||||
has_many :supporters, through: :ticket_purchases, source: :user
|
||||
has_many :tickets, dependent: :destroy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue