Skip to content

Commit

Permalink
Added docs for slug_limit option
Browse files Browse the repository at this point in the history
  • Loading branch information
avokhmin committed May 16, 2017
1 parent 8b8caff commit a8b6db5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/friendly_id/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ module Base
# Configures the name of the column where FriendlyId will store the slug.
# Defaults to `:slug`.
#
# @option options [Integer] :slug_limit Available when using `:slugged`.
# Configures the limit of the slug. This option has no default value.
#
# @option options [Symbol] :slug_generator_class Available when using `:slugged`.
# Sets the class used to generate unique slugs. You should not specify this
# unless you're doing some extensive hacking on FriendlyId. Defaults to
Expand Down
4 changes: 4 additions & 0 deletions lib/friendly_id/initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
#
# config.slug_column = 'slug'
#
# By default, slug has no size limit, but you can change it if you wish.
#
# config.slug_limit = 255
#
# When FriendlyId can not generate a unique ID from your base method, it appends
# a UUID, separated by a single dash. You can configure the character used as the
# separator. If you're upgrading from FriendlyId 4, you may wish to replace this
Expand Down

0 comments on commit a8b6db5

Please sign in to comment.