From: Jonathan Leighton Date: 2006-01-14T06:35:27+09:00 Subject: Re: why is this a comile error On Sat, 2006-01-14 at 06:20 +0900, James Edward Gray II wrote: > On Jan 13, 2006, at 3:14 PM, bimo remus wrote: > > > I am doing a tutorial from the Thomas~Hansson book and am getting this > > error: > > > > Extracted source (around line #17): > > > > 14: <%= link_to 'Add to Cart', > > 15: {:action => 'add_to_cart', > > 16: :id => product }, > > 17: class => 'addtocart' %> > > 18:
> > 19: > > 20: > > You are missing one character from the book. On the last line it's > ":class", not "class". The latter is a reserved word in Ruby with > special meaning, thus the problem. By the way, you will be doing yourself a service to get a text editor that includes syntax highlighting for Ruby and rhtml. Little mistakes like this will be much easier to spot. I know jEdit, Textmate and RadRails all support rhtml highlighting. Jon -- Jonathan Leighton http://turnipspatch.com/ | http://jonathanleighton.com/ | http://digital-proof.org/