add achievement management
This commit is contained in:
11
app/models/wow_achievement_category.rb
Normal file
11
app/models/wow_achievement_category.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WowAchievementCategory < ApplicationRecord
|
||||
extend Mobility
|
||||
translates :name
|
||||
|
||||
has_many :wow_achievements, dependent: :destroy
|
||||
|
||||
validates :name, presence: true
|
||||
validates :category_id, presence: true, uniqueness: true
|
||||
end
|
||||
Reference in New Issue
Block a user