Module: FriendlyId::Slugged::Configuration
- Defined in:
- lib/friendly_id/slugged.rb
Overview
This module adds the :slug_column
, and :slug_limit
, and :sequence_separator
,
and :slug_generator_class
configuration options to
FriendlyId::Configuration.
Instance Attribute Summary collapse
-
#sequence_separator ⇒ Object
The string used to separate a slug base from a numeric sequence.
-
#slug_column ⇒ Object
The column that will be used to store the generated slug.
-
#slug_generator_class ⇒ Object
Returns the value of attribute slug_generator_class.
-
#slug_limit ⇒ Object
The limit that will be used for slug.
Instance Method Summary collapse
-
#query_field ⇒ Object
Makes FriendlyId use the slug column for querying.
Instance Attribute Details
#sequence_separator ⇒ Object
The string used to separate a slug base from a numeric sequence.
You can change the default separator by setting the sequence_separator configuration option.
403 404 405 |
# File 'lib/friendly_id/slugged.rb', line 403 def sequence_separator @sequence_separator ||= defaults[:sequence_separator] end |
#slug_column ⇒ Object
The column that will be used to store the generated slug.
408 409 410 |
# File 'lib/friendly_id/slugged.rb', line 408 def slug_column @slug_column ||= defaults[:slug_column] end |
#slug_generator_class ⇒ Object
Returns the value of attribute slug_generator_class.
389 390 391 |
# File 'lib/friendly_id/slugged.rb', line 389 def slug_generator_class @slug_generator_class end |
#slug_limit ⇒ Object
The limit that will be used for slug.
413 414 415 |
# File 'lib/friendly_id/slugged.rb', line 413 def slug_limit @slug_limit ||= defaults[:slug_limit] end |
Instance Method Details
#query_field ⇒ Object
Makes FriendlyId use the slug column for querying.
393 394 395 |
# File 'lib/friendly_id/slugged.rb', line 393 def query_field slug_column end |