1
0
Fork 0
dokkan-data-rails/app/models/passive_skill.rb

14 lines
277 B
Ruby
Raw Normal View History

2015-10-06 13:55:12 -04:00
class PassiveSkill < ActiveRecord::Base
has_paper_trail
2015-10-06 13:55:12 -04:00
validates :name, presence: true
2015-10-23 11:27:15 -04:00
validates :description, presence: true,
uniqueness: { scope: :name }
2015-10-08 13:08:45 -04:00
default_scope { order(:name) }
def full
"#{name} - #{description}"
end
2015-10-06 13:55:12 -04:00
end