Use slugs for categories and posts, leading to nicer urls
post slugs are limited to 80 characters, so in case we have a post with a long and duplicate title, we still have a reasonable length for the url (80 characters + https://decent-organisations.tld/posts/ + 36 characters UUID generated by FriendlyId in case of duplicate slugs)
NOTE: After the migrations have run, all existing posts and categories need to be touched and saved once to populate the slugs. Is it sufficient to run Category.find_each(&:save) and Post.find_each(&:save) in the console or do we need a rake script (or something else, I'm honestly not too sure what the best approach would be)?
https://decent-organisations.tld/posts/
+ 36 characters UUID generated by FriendlyId in case of duplicate slugs)NOTE: After the migrations have run, all existing posts and categories need to be touched and saved once to populate the slugs. Is it sufficient to run
Category.find_each(&:save)
andPost.find_each(&:save)
in the console or do we need a rake script (or something else, I'm honestly not too sure what the best approach would be)?Closes #10