add WowGuild model
This commit is contained in:
12
app/models/wow_guild.rb
Normal file
12
app/models/wow_guild.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WowGuild < ApplicationRecord
|
||||
extend Mobility
|
||||
translates :translated_faction
|
||||
|
||||
belongs_to :wow_realm
|
||||
has_many :wow_characters, dependent: :nullify
|
||||
|
||||
validates :name, presence: true
|
||||
validates :guild_id, presence: true, uniqueness: true
|
||||
end
|
||||
Reference in New Issue
Block a user