to_param()
Instance Public methods
Returns a String, which Action Pack uses for
constructing an URL to this object. The default implementation returns this
record's id as a String, or nil if this
record's unsaved.
For example, suppose that you have a User model,
and that you have a resources :users route. Normally,
user_path will construct a path with the user object's
'id' in it:
user = User.find_by(name: 'Phusion')
user_path(user) # => "/users/1"
You can override to_param in