hello..

I am new to Ruby on Rails.. (2.2)
I am currently following steps from the book "agile web delopment with
Rails" building depot application.

It says I need to edit "app/models/product.rb" file and add the
following lines to check the price to be at least a cent.. that's 0.01

----
def price_must_be_at_least_a_cent
    errors.add(:price, 'should be at least 0.01' ) if price.nil? ||
price < 0.01
end
----

after this,  I typed 0.1 and 0.10, and get the error.. saying "should
be at least 0.01"..
if I type 1, or 0.01.. I don't get the error.

am I the only one with this problem? if so, i'd like to know what I
need to do to fix the problem.

thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to