Re: [Rails] Need help debugging syntax error from Agile Web Development, 3RD Edition

2009-12-04 Thread Christoph Jasinski
That's an easy one, really. You got a typo. ** class Product ActiveRecord::Base validates_presence_of :title, :description, :image_url, validates_numericality_of :price ** remove the last comma from the line

Re: [Rails] Need help debugging syntax error from Agile Web Development, 3RD Edition

2009-12-04 Thread Dhruva Sagar
As far as I can see there is an extra ',' (comma) at the end of the first statement, the statement just before your validates_numericality_of. I have indicated that below within *[]*. Removing that should solve your issue. class Product ActiveRecord::Base validates_presence_of :title,

[Rails] Need help debugging syntax error from Agile Web Development, 3RD Edition

2009-12-03 Thread pauld
Hi-- I'm having trouble with a syntax error, which I'm working with on page 89 of Agile Web Development. I'm getting the following syntax error: /Users/pdenlinger/Sites/depot/app/models/product.rb:4: syntax error, unexpected tSYMBEG, expecting kDO or '{' or '(' validates_numericality_of :price