Quiz Yourself: Order and Placement Model
Try to answer these questions to make sure that you understood this chapter.
1
How can we ensure that an Active Record field is greater than 0
?
A)
validates :total, numericality: { greater_than_or_equal_to: 0 }
B)
validates :total, numericality: true
C)
validates :total, length: { minimum: 0 }
Question 1 of 40 attempted
Get hands-on with 1200+ tech skills courses.