I have a simple question: Slugify via helper or store the slug on database?
I mean, let's suppose that I have Guilherme Oderdenge
on database and I want to transform it into a human-readable URL such as http://myapp.com/guilherme-oderdenge/
, what's the best way to perform this? Storing guilherme-oderdenge
in the database or transforming Guilherme Oderdenge
in a slug with a helper like user.name.slugify
?
I know there are some ways to reach the expected result, but which one is better? Or at least there is a better way?
It depends of the technology that you're using
-
I'm using Ruby On Rails with MySQL.