parent
1a8d2c3e96
commit
71220cd85f
@ -1,3 +1,7 @@
|
||||
class Review < ApplicationRecord
|
||||
belongs_to :movie
|
||||
|
||||
validates :name, presence: true
|
||||
validates :comment, length: { minimum: 4 }
|
||||
validates :stars, numericality: { greater_than_or_equal_to: 1, less_than_or_equal_to: 5 }
|
||||
end
|
||||
|
Loading…
Reference in new issue