Hassan Schroeder wrote: > On Sat, May 23, 2009 at 11:09 AM, Santosh Turamari > <rails-mailing-l...@andreas-s.net> wrote: > >> I am using this code. >> In application_helper >> >> return url_for :only_path => false,:controller => 'community', :action >> => 'search_route',:company =>((company.downcase.strip.squeeze(" >> ")).gsub(/[^[:alnum:]'&''.''!']/,'-')).squeeze("-").chomp("-"), :id => >> id > > Uh, you're telling it to substitute a '-' for white-space in the name; > if > that's not what you want, don't do it :-) > > -- > Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
Hi, Thanks for the reply.. Here my main problem is I want to have only space between two words. Here if I use only company.downcase.strip, then it is taking '+'sign such as "abc+xyz".. I want it to be"abc xyz". Can I get the condition to produce the output of that kind.! -- 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---