class FriendlyId::Slugged::Status
Attributes
sequence[RW]
slug[RW]
Public Instance Methods
best?()
click to toggle source
Did the find operation use the best possible id? True if id
is
numeric, but the model has no slug, or id
is friendly and
current
# File lib/friendly_id/slugged.rb, line 10 def best? current? || (numeric? && !record.slug) end
current?()
click to toggle source
Did the find operation use the current slug?
# File lib/friendly_id/slugged.rb, line 15 def current? !! slug && slug.current? end
friendly?()
click to toggle source
Did the find operation use a friendly id?
# File lib/friendly_id/slugged.rb, line 20 def friendly? !! (name or slug) end
friendly_id=(friendly_id)
click to toggle source
# File lib/friendly_id/slugged.rb, line 24 def friendly_id=(friendly_id) @name, @sequence = friendly_id.parse_friendly_id(record.friendly_id_config.sequence_separator) end
outdated?()
click to toggle source
Did the find operation use an outdated slug?
# File lib/friendly_id/slugged.rb, line 29 def outdated? !current? end