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? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
TextMate is the standard for Ruby development on the Mac. Personally I use UltraEdit on Windows and it seems to work well. There is a text highlight profile specifically for Ruby. Hope this helps. Eric Knoller RoR Power, Inc. http://www.rorpower.com AzamSharp wrote:> 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?-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Eric, Thanks for the reply! I have one more question. Let''s say I have a model named "Product". How would I know what methods it supports? Like I know I can do this: Product.content_columns but how would I know that the content_columns exists without intellisence? On Mar 15, 3:12 pm, Eric Knoller <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> TextMate is the standard for Ruby development on the Mac. Personally I > use UltraEdit on Windows and it seems to work well. There is a text > highlight profile specifically for Ruby. > > Hope this helps. > > Eric Knoller > RoR Power, Inc.http://www.rorpower.com > > > > AzamSharp wrote: > > 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? > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 15, 2008, at 9:12 PM, Eric Knoller wrote:> TextMate is the standard for Ruby development on the Mac.Standard? Schmandard! I personally prefer Coding Monkeys'' SubEthaEdit: http://www.codingmonkeys.de/subethaedit/ One way or another, there should be a ''Show Invisible Characters'' or such in all those editors. -- PA. http://alt.textdrive.com/nanoki/ --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 15, 4:15 pm, AzamSharp <azamsh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Eric, > > Thanks for the reply! > > I have one more question. > > Let''s say I have a model named "Product". How would I know what > methods it supports?Product.methods or Product.instance_methods Adam --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, On Mar 15, 3:23 pm, Adam C <ocdra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mar 15, 4:15 pm, AzamSharp <azamsh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi Eric, > > > Thanks for the reply! > > > I have one more question. > > > Let''s say I have a model named "Product". How would I know what > > methods it supports? > > Product.methods or Product.instance_methods > > Adam--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > > Let''s say I have a model named "Product". How would I know what > > methods it supports? > > Product.methods or Product.instance_methods >With the caveat that with a language like ruby the methods might not exist until you call them (Eg the dynamic finders are created by method_missing when you first call them). Rails makes fairly heavy use of that sort of thing. Fred --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 15, 8:15 pm, AzamSharp <azamsh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Let''s say I have a model named "Product". How would I know what > methods it supports? Like I know I can do this: > > Product.content_columns > > but how would I know that the content_columns exists without > intellisence?Oh, both aptana and netbeans have some degree of code completion, but I don''t use either of those so I don''t know how good it is. Fred --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
AzamSharp wrote:> Let''s say I have a model named "Product". How would I know what > methods it supports? Like I know I can do this: > > Product.content_columns > > but how would I know that the content_columns exists without > intellisence?An "intelligent" IDE is no substitute for an API reference and learning the framework you intend to use. In Rails, if you have an ActiveRecord model, then information about what methods it supports starts here: http://api.rubyonrails.com/classes/ActiveRecord/Base.html -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
In console, I prefer the form: Product.methods - Object.methods or Product.instance_methods - Object.methods This reduces information clutter... F --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---