initial rebuild from v1
This commit is contained in:
14
app/models/wow_character.rb
Normal file
14
app/models/wow_character.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class WowCharacter < ApplicationRecord
|
||||
extend Mobility
|
||||
translates :translated_faction, :translated_gender
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :wow_realm
|
||||
belongs_to :wow_class
|
||||
belongs_to :wow_race
|
||||
belongs_to :wow_character_title, optional: true
|
||||
has_one :wow_character_medium, dependent: :nullify
|
||||
|
||||
validates :name, presence: true
|
||||
validates :character_id, presence: true, uniqueness: true
|
||||
end
|
||||
Reference in New Issue
Block a user