class FriendlyId::ActiveRecord2::SluggedModel::CachedSingleFinder

Performs a find for multiple friendly_ids using the cached_slug column, if available. This is significantly faster, and can be used in all circumstances unless the :scope argument is present.

Public Instance Methods

column() click to toggle source

The column used to store the cached slug.

# File lib/friendly_id/active_record2/slugged_model.rb, line 135
def column
  "#{table_name}.#{friendly_id_config.cache_column}"
end
find() click to toggle source
# File lib/friendly_id/active_record2/slugged_model.rb, line 126
def find
  @result = with_scope({:find => find_options}) { find_initial options }
  handle_friendly_result if friendly?
  @result
rescue ActiveRecord::RecordNotFound
  SingleFinder.new(id, model_class, options).find
end