Many visual tweaks, suggested by Lan
[cs356-p2-videostore.git] / app / models / video_policy.rb
1 class VideoPolicy < ActiveRecord::Base
2   validates_presence_of :day
3   validates_presence_of :fee
4   validates_presence_of :period
5   validates_presence_of :description
6
7   validates_numericality_of :day
8   validates_numericality_of :fee
9   validates_numericality_of :period
10
11   protected
12   def validate
13     errors.add(:fee, "must be greater than $0.01") if fee < 0.01
14   end
15 end