This commit is contained in:
Rico Sta. Cruz 2015-03-18 14:19:33 +08:00
parent 4fc101def2
commit 1c646f41af
1 changed files with 4 additions and 4 deletions

View File

@ -124,9 +124,9 @@ Validation
class Person < ActiveRecord::Base
  validates :name, presence: true
validates :name, presence: true
  validates :terms, acceptance: true
validates :terms, acceptance: true
validates :email, confirmation: true
@ -150,8 +150,8 @@ Validation
validates :played, numericality: { only_integer: true }
# Validate the associated records to ensure they're valid as well
  has_many :books
  validates_associated :books
has_many :books
validates_associated :books
# Length (full enchalada)
validates :content, length: {