fix reverse n-to-n relationship
This commit is contained in:
@@ -2,8 +2,8 @@ class WowMount < ApplicationRecord
|
||||
extend Mobility
|
||||
translates :name, :description, :translated_faction, :translated_source
|
||||
|
||||
has_many :user_obtain_mounts, dependent: :destroy
|
||||
has_many :users, through: :user_obtain_mounts
|
||||
has_many :user_obtain_wow_mounts, dependent: :destroy
|
||||
has_many :users, through: :user_obtain_wow_mounts
|
||||
|
||||
validates :name, presence: true
|
||||
validates :mount_id, presence: true, uniqueness: true
|
||||
|
||||
Reference in New Issue
Block a user