Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to add initializer option for treat_reserved_as_conflict #845

Closed
timsjpark opened this issue Nov 7, 2017 · 0 comments
Closed

Request to add initializer option for treat_reserved_as_conflict #845

timsjpark opened this issue Nov 7, 2017 · 0 comments

Comments

@timsjpark
Copy link
Contributor

Just a small request to add an initializer option for the new feature for treating reserved words as conflicts. I think this feature should be disabled by default. Thanks!

FriendlyId.defaults do |config|
  # ## Reserved Words
  #
  # Some words could conflict with Rails's routes when used as slugs, or are
  # undesirable to allow as slugs. Edit this list as needed for your app.
  config.use :reserved

  config.reserved_words = %w(new edit index session login logout users admin
    stylesheets assets javascripts images)

  # This adds an option to to treat reserved words as conflicts rather than exceptions.
  # When there is no good candidate, a UUID will be appended, matching the existing
  # conflict behavior.

  # config.treat_reserved_as_conflict = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant