Module: FriendlyId::Base
- Included in:
- ActiveRecordAdapter
- Defined in:
- lib/friendly_id.rb
Instance Method Summary collapse
-
#has_friendly_id(method, options = {}) ⇒ Object
Set up a model to use a friendly_id.
-
#uses_friendly_id? ⇒ Boolean
Does the model class use the FriendlyId plugin?.
Instance Method Details
#has_friendly_id(method, options = {}) ⇒ Object
Set up a model to use a friendly_id. This method accepts a hash with several possible options.
45 46 47 |
# File 'lib/friendly_id.rb', line 45 def has_friendly_id(method, = {}) raise NotImplementedError end |
#uses_friendly_id? ⇒ Boolean
Does the model class use the FriendlyId plugin?
50 51 52 |
# File 'lib/friendly_id.rb', line 50 def uses_friendly_id? respond_to? :friendly_id_config end |