Programming Tips
Research on Ruby on Rails, JavaScript, CSS, HTML, Php and Flash
Thursday, October 29, 2009
Ruby on Rails : Replace character
Replace spacing to underscore.
<%= person.firstname %>
--> Peterson Gate
<%= person.firstname.gsub(/ /, '_') %>
--> Peterson_Gate
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment