Profile
Achievement
![first submission:submitting first snipplet first submission:submitting first snipplet](/img/badge/badge_2.png?v3)
stayce's Recent SnippetsTagged ruby
- All /
« Prev 1 Next »
validate :price_must_be_at_least_a_cent
protected def price_must_be_at_least_a_cent
errors.add(:price, 'should be at least 0.01') if price.nil? || price < 0.01
end
0
589
posted 14 years ago by stayce