search for: format_url

Displaying 1 result from an estimated 1 matches for "format_url".

Did you mean: format_rr
2008 Jul 19
5
helper functions permanently altering variables
...ings, I''m not sure if I''m maybe not understanding the helper functions correctly, but I''m having a weird problem that seems like it shouldn''t be. I''m sanitizing some book names for url''s using my application helper: -- application helper def format_url(url) title = url clean_string(title) truncate(@title, 100, "") return title end def clean_string(str) str.gsub!(/\W+/, '' '') # all non-word chars to spaces str.strip! # ohh la la str.downcase! # str.gsub!(/\ +/, '...