Sunday, 25 August 2013

Rails: Saving Input whithout Spaces

Rails: Saving Input whithout Spaces

I'm searching on how to Save my Input without the spaces.
I collect the input on my form via
<%= f.input :name %>
and use it also for linking
localhost:3000/users/:name
The Problem is, if someone uses Spaces in his name the link is getting all
ugly with % signs etc.
How can i store the input without spaces ?
E.g.
input is: Hey im John saving as: HeyimJohn

No comments:

Post a Comment