Add order and show_in_roadmap fields to PostStatus

This commit is contained in:
riggraz
2019-08-26 18:15:52 +02:00
parent 98b5b97a4e
commit b496a4d624
6 changed files with 34 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
class PostStatus < ApplicationRecord
validates :name, presence: true, uniqueness: true
validates :color, format: { with: /\A#(?:[0-9a-fA-F]{3}){1,2}\z/ }
validates :order, numericality: { only_integer: true, greater_than: 0 }
end