Hi Colin-- Thanks. Got the errors.
Two missing commas. Will try to avoid repeating that mistake in the future. Paul On Dec 4, 4:23 pm, Colin Law <[email protected]> wrote: > 2009/12/4 pauld <[email protected]>: > > > Thank you. > > > I'm still getting an error for the second statement: > > > /Users/pdenlinger/Sites/depot/app/models/product.rb:9: syntax error, > > unexpected tASSOC, expecting kEND > > ... :message => 'must be a URL for GIF, JPG' ... > > ^ > > > The code is as follows: > > > validates_format_of :image_url, > > :with => %r{\.(gif|jpg|png$)}i > > :message => 'must be a URL for GIF, JPG' + 'or > > PNG image' > > I know it is difficult when just starting, but I would have thought > that following the previous problem with a comma that you could have > worked out this one yourself. When you see a syntax error the problem > saying something unexpected found that means that there is likely an > error a bit before the point noted. The basic syntax of > validates_format_of (or any function for that matter) is > validates_format_of <parameter>, <parameter>, ... :image_url is the > first parameter, :with => ... is the second and :message => .. is the > third. I am sure you can see the error, or at least the one > generating the message. > > Colin -- 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.

