Module: FriendlyId::Base
- Included in:
- ActiveRecordAdapter
- Defined in:
- lib/friendly_id.rb
Instance Method Summary (collapse)
-
- (Object) has_friendly_id(method, options = {})
Set up a model to use a friendly_id.
-
- (Boolean) uses_friendly_id?
Does the model class use the FriendlyId plugin?.
Instance Method Details
- (Object) has_friendly_id(method, options = {})
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 |
- (Boolean) uses_friendly_id?
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 |