This is form the 2.ed agile book in the product model:
validates_presence_of :title, :description, :image_url
errors.add(:price, “should be at least 0.01”) if price.nil? || price <
Why does the method that checks the price have to be protected?
Couldnt I, instead of the method just write:
validates_numericality_of :price, :minimum => 0.01
Thanks in advance.