module FriendlyId::Slugged::Configuration

This module adds the ‘:slug_column`, and `:slug_limit`, and `:sequence_separator`, and `:slug_generator_class` configuration options to {FriendlyId::Configuration FriendlyId::Configuration}.

Attributes

sequence_separator[W]
slug_column[W]
slug_generator_class[RW]
slug_limit[W]

Public Instance Methods

query_field() click to toggle source

Makes FriendlyId use the slug column for querying. @return String The slug column.

# File lib/friendly_id/slugged.rb, line 393
def query_field
  slug_column
end
sequence_separator() click to toggle source

The string used to separate a slug base from a numeric sequence.

You can change the default separator by setting the {FriendlyId::Slugged::Configuration#sequence_separator sequence_separator} configuration option. @return String The sequence separator string. Defaults to “‘-`”.

# File lib/friendly_id/slugged.rb, line 403
def sequence_separator
  @sequence_separator ||= defaults[:sequence_separator]
end
slug_column() click to toggle source

The column that will be used to store the generated slug.

# File lib/friendly_id/slugged.rb, line 408
def slug_column
  @slug_column ||= defaults[:slug_column]
end
slug_limit() click to toggle source

The limit that will be used for slug.

# File lib/friendly_id/slugged.rb, line 413
def slug_limit
  @slug_limit ||= defaults[:slug_limit]
end