Spaces in Ruby on Rails and how to avoid them!

AzamSharp
Sat, 15 Mar 2008 19:37:21 -0000

Hi,

I just started learning ruby on rails and I am having hard time with
white spacing!

Here is the piece of code that will not work:

validates_format_of
:image_url,
:with => %r{\.(gif|jpg|png)$}i,
:message => "must be a URL for a GIF, JPG or PNG image"

and here is the piece of code that will work:

validates_format_of :image_url,
:with => %r{\.(gif|jpg|png)$}i,
:message => "must be a URL for a GIF, JPG or PNG image"

by putting the :image_url on the second line all hell breaks loose. Is
there any good Ruby, Rails editor which can make sure that the code is
in good shape and valid!

Is there any editor with intellisense support?