sudara / alonetone

A free, open source, non-commercial home for musicians and their music
https://alonetone.com
MIT License
349 stars 89 forks source link

A playlist with the title "New" conflicts with Create New Playlist #1095

Open ofsound opened 3 years ago

ofsound commented 3 years ago

Example of the problem:

A playlist with the title "New" will generate an url that is the same as the create new playlist url

Without this feature, a playlist url for the playlist "New" would be /sudara/playlists/new

Other examples include anyone creating an account with the name users or 'playlists`.

We probably need to add a feature to slug.rb so that it sidesteps reserved words, for example by suffixing a number.

Partial list of words to start with, inspired by `rails routes'

admin
sidekiq
comments
pages
playlists
users
new
about
new 
delete