Module: FriendlyId::DataMapperAdapter
- Includes:
- Base
- Defined in:
- lib/friendly_id_datamapper.rb,
lib/friendly_id/datamapper_adapter/version.rb,
lib/friendly_id/datamapper_adapter/simple_model.rb,
lib/friendly_id/datamapper_adapter/configuration.rb,
lib/friendly_id/datamapper_adapter/slugged_model.rb
Defined Under Namespace
Modules: ClassMethods, SimpleModel, SluggedModel, Version Classes: Configuration
Instance Method Summary collapse
Instance Method Details
#has_friendly_id(method, options = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/friendly_id_datamapper.rb', line 16 def has_friendly_id(method, = {}) extend FriendlyId::DataMapperAdapter::ClassMethods @friendly_id_config = Configuration.new(self, method, ) if friendly_id_config.use_slug? include ::FriendlyId::DataMapperAdapter::SluggedModel else include ::FriendlyId::DataMapperAdapter::SimpleModel end end |