Reserve words for your system
Add this line to your application's Gemfile:
gem 'reserved_words'
And then execute:
$ bundle
Or install it yourself as:
$ gem install reserved_words
List default words
[1] pry(main)> ReservedWords.list
=> ["admin", "api", "image", "rss", "www"]
Add your own word
[1] pry(main)> ReservedWords.add('blog')
=> ["admin", "api", "blog", "image", "rss", "www"]
[1] pry(main)> ReservedWords.add(['blog', 'public'])
=> ["admin", "api", "blog", "image", "public", "rss", "www"]
Remove word
[1] pry(main)> ReservedWords.remove('rss')
=> ["admin", "api", "image", "www"]
Restore default words
[1] pry(main)> ReservedWords.clear!
=> ["admin", "api", "image", "rss", "www"]
If you are using Rails, config/initializers/reserved_words.rb
is a good place to create your own reserved words
- Fork it ( https://github.com/bitjourney/reserved_words/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request