Module: FriendlyId::ActiveRecordAdapter
- Includes:
- Base
- Included in:
- ActiveRecord::Base
- Defined in:
- lib/friendly_id/active_record.rb,
lib/friendly_id/active_record_adapter/relation.rb,
lib/friendly_id/active_record_adapter/simple_model.rb,
lib/friendly_id/active_record_adapter/configuration.rb,
lib/friendly_id/active_record_adapter/slugged_model.rb
Defined Under Namespace
Modules: Relation, SimpleModel, SluggedModel Classes: Configuration
Instance Method Summary (collapse)
Methods included from Base
Instance Method Details
- (Object) has_friendly_id(method, options = {})
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/friendly_id/active_record.rb', line 7 def has_friendly_id(method, = {}) class_attribute :friendly_id_config self.friendly_id_config = Configuration.new(self, method, ) if friendly_id_config.use_slug? include SluggedModel else include SimpleModel end end |