I want to link to /member/:name. I'm using this line in routes.rb:
match 'member/:id', :to => "members#show", :as => :show_member, :via => :get
and this in the model:
def to_param
username
end
Next, I want to link to a the name represented as a string that has white spaces. I want to replace the white spaces with + (plus) or something else more readable than standard %20 replacement.
I could handle these replacements (from space to +, and from + to space) in a method, but I was wondering if there is a better way of handling this.