thanks , part of the solution as per Michael's patch

On 19 avr, 00:38, Philip Hallstrom <[email protected]> wrote:
> On Apr 18, 2011, at 3:09 PM, Erwin wrote:
>
> > I need to transform strings like "Instructor ID"  or "Lovely Ice tree"
> > into sym  :instructor_id  , :lovely_ice_tree
> > I tried to do the following :
> > downcase all string components the unique the spaces and replace w an
> > underscore
>
> > is there a better and faster way to do it ?
>
> string.downcase.tr(' ', '_')
>
> maybe.

-- 
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.

Reply via email to