jpmcgrath / shortener

Shortener makes it easy to create shortened URLs for your rails application.
MIT License
539 stars 223 forks source link

forbidden_keys feature #104

Open asok opened 6 years ago

asok commented 6 years ago

Hi, thanks for this gem, it made our work easier.

One thing though - in the readme you are mentioning that it is possible to forbid some words from being generate as a unique key. Yet the code does not use this array. Or am I missing something?

I've found commit that does add the feature https://github.com/jpmcgrath/shortener/commit/c7885426ffe85f5fea4b15bb16fc3e5f6841fe61 But I cannot find a commit that removes the usage of forbidden_keys in the code that generates the unique key.

jpmcgrath commented 6 years ago

You're right, it seems along the way we dropped this feature. AFAIK this was not a conscious decision to remove this, and I suspect it was an unintended side effect of some refactoring. I am guessing that we didn't have a spec exercising this behaviour and someone neatened up the code without realizing the impact (similarly it slipped past reveiw). I will look at adding it back in, or alternatively if you would like this feature in a rush a PR would be most welcome.