We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddac753 commit f3ca217Copy full SHA for f3ca217
1 file changed
app/models/workshop_sponsor.rb
@@ -1,6 +1,6 @@
1
class WorkshopSponsor < ApplicationRecord
2
belongs_to :sponsor
3
- belongs_to :workshop
+ belongs_to :workshop, inverse_of: :workshop_sponsors
4
5
validates :sponsor_id, uniqueness: { scope: :workshop_id, message: :already_sponsoring }
6
end
0 commit comments