Module: FriendlyId::ActiveRecordAdapter::SimpleModel::SimpleFinder

Included in:
MultipleFinder, SingleFinder
Defined in:
lib/friendly_id/active_record_adapter/simple_model.rb

Overview

Some basic methods common to MultipleFinder and SingleFinder.

Instance Method Summary collapse

Instance Method Details

#columnObject

The column used to store the friendly_id.



10
11
12
# File 'lib/friendly_id/active_record_adapter/simple_model.rb', line 10

def column
  "#{table_name}.#{friendly_id_config.column}"
end

#primary_keyObject

The model’s fully-qualified and quoted primary key.



15
16
17
# File 'lib/friendly_id/active_record_adapter/simple_model.rb', line 15

def primary_key
  "#{quoted_table_name}.#{model_class.send :primary_key}"
end