From: Phillip Gawlowski Date: 2008-04-25T00:35:46+09:00 Subject: Re: Expected kelse -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 erik wrote: | The following piece of code returns: | syntax error, unexpected kELSE, expecting kEND | | When I delete this block of code all works well - I have read that | this may be an issue with copied or pasted code, UTF-8 issues etc.... | | I have tried all of these - is there simply something wrong with my | code that I am not seeing? Removing the ERb cruft: if c.amount < 500 ~ @project.budgmonthexpends.find(:all, :conditions => [:year_id == c.year_id]).each do |d| ~ else ~ @project.budgmonthexpends.find(:all, :conditions => ~ :year_id == c.year_id).each do |d| ~ end Stuffing an 'else' in a block makes Ruby throw an error, obviously. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan ~ - You know you've been hacking too long when... ...you get snail mail, and you think to your self "You have new mail on node "your_address" from user "name_on_the_frank". -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgQqNAACgkQbtAgaoJTgL9qZwCfQEmZTKTuIZLneB3NINWKVXOr WKQAnj84e3tV9mkGITpgbqY0BTq1OGUk =jPbH -----END PGP SIGNATURE-----