class FriendlyId::ActiveRecord2::Configuration
Attributes
cache_column[RW]
The column used to cache the friendly_id string. If no column is specified,
FriendlyId will look for a column named
cached_slug
and use it automatically if it exists. If for some
reason you have a column named cached_slug
but don't want
FriendlyId to modify it, pass the
option +:cache_column => false+ to
{FriendlyId::ActiveRecord2#has_friendly_id has_friendly_id}.
child_scopes[R]
An array of classes for which the configured class serves as a FriendlyId scope.
custom_cache_column[R]
Public Instance Methods
cache_column=(cache_column)
click to toggle source
# File lib/friendly_id/active_record2/configuration.rb, line 28 def cache_column=(cache_column) @cache_column = cache_column @custom_cache_column = cache_column end
cache_column?()
click to toggle source
# File lib/friendly_id/active_record2/configuration.rb, line 24 def cache_column? !! cache_column end
cache_finders?()
click to toggle source
# File lib/friendly_id/active_record2/configuration.rb, line 33 def cache_finders? !! cache_column end
custom_cache_column?()
click to toggle source
# File lib/friendly_id/active_record2/configuration.rb, line 41 def custom_cache_column? !! custom_cache_column end
scope_for(record)
click to toggle source
# File lib/friendly_id/active_record2/configuration.rb, line 45 def scope_for(record) scope? ? record.send(scope).to_param : nil end
scopes_over?(klass)
click to toggle source
# File lib/friendly_id/active_record2/configuration.rb, line 49 def scopes_over?(klass) scope? && scope == klass.to_s.underscore.to_sym end