Module FleskPlugins::ActsAsSluggable::ClassMethods
In: lib/acts_as_sluggable.rb

Methods

Public Class methods

Create a "sluggable_attribute" accessor on the model class.

[Source]

    # File lib/acts_as_sluggable.rb, line 15
15:       def self.extended(base)
16:         class << base
17:           self.instance_eval do
18:             attr_accessor :sluggable_attribute
19:           end
20:         end
21:       end

Public Instance methods

Make this class behave sluggish. Takes an options hash. options[:with] is the name of the attribute you want to create the slug from. E.g. acts_as_sluggable :with => ‘title’

[Source]

    # File lib/acts_as_sluggable.rb, line 26
26:       def acts_as_sluggable(options = {})
27:         self.sluggable_attribute = options[:with] if options[:with]
28:         self.send(:include, InstanceMethods)
29:       end

[Validate]