validations

2. If i check this validates_numericality_of :price why do i have to
check in here:
def validate
  errors.add(:price, "should be at least 0.01" ) if price.nil? || price
< 0.01
end

if price.nil? ? Why do i have to check that ? Isnt that checked with
validates_numericality_of :price ?

Hi,

You can use validates_numericality_of :price, :allow_nil=>false