Module: FriendlyId::MethodScopes
- Defined in:
- lib/friendly_id/method_scopes.rb,
lib/friendly_id/method_scopes/version.rb
Defined Under Namespace
Modules: Configuration
Constant Summary collapse
- VERSION =
File.read(File.('../../../../VERSION', __FILE__))
Class Method Summary collapse
-
.included(model_class) ⇒ Object
Sets up behavior and configuration options for FriendlyId::MethodScopes’s method_scopes slugs feature.
-
.setup(model_class) ⇒ Object
FriendlyId::Config.use will invoke this method when present, to allow loading dependent modules prior to overriding them when necessary.
- .version_string ⇒ Object
Class Method Details
.included(model_class) ⇒ Object
Sets up behavior and configuration options for FriendlyId::MethodScopes’s method_scopes slugs feature.
12 13 14 15 16 |
# File 'lib/friendly_id/method_scopes.rb', line 12 def self.included(model_class) model_class.class_eval do friendly_id_config.class.send :include, Configuration end end |
.setup(model_class) ⇒ Object
FriendlyId::Config.use will invoke this method when present, to allow loading dependent modules prior to overriding them when necessary.
6 7 8 |
# File 'lib/friendly_id/method_scopes.rb', line 6 def self.setup(model_class) model_class.friendly_id_config.use :slugged end |
.version_string ⇒ Object
5 6 7 |
# File 'lib/friendly_id/method_scopes/version.rb', line 5 def self.version_string "FriendlyId::MethodScopes version #{FriendlyId::MethodScopes::VERSION}" end |