search for: 553dc849

Displaying 1 result from an estimated 1 matches for "553dc849".

Did you mean: 553849
2006 Apr 08
2
Issue with validation
Hello, I just got hold of the book ''Agile Web Development with Rails'' and I have been following along. I just went through a segment of trying to add validation to a form. I added the following code, as instructed, to my app/models/Products.rb file: protected def validate errors.add(:Price, "should be positive") unless Price.nil? || Price >= 0.01 end