Add number of pieces to puzzles
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
# id :integer not null, primary key
|
||||
# brand :string
|
||||
# name :string
|
||||
# pieces :integer not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# contest_id :integer not null
|
||||
@@ -24,4 +25,5 @@ class Puzzle < ApplicationRecord
|
||||
has_one_attached :image
|
||||
|
||||
validates :name, presence: true
|
||||
validates :pieces, presence: true
|
||||
end
|
||||
|
Reference in New Issue
Block a user