My application is in RoR
I have an action/view called showsummary where the ID has been passed into the URL, and the controller has used that to instantiate @vendor wher
I thought I'd mention String#parameterize, as a supplement to the tagged answer.
def to_param "#{id}-#{name.parameterize}" end
It'll filter out hyphenated characters, replace spaces with dashes etc.