15 lines
403 B
Ruby
15 lines
403 B
Ruby
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
|