Module: Mongoid::Utils::Sluggable

Extended by:
ActiveSupport::Concern
Defined in:
lib/mongoid/utils/sluggable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#generate_slugObject



16
17
18
# File 'lib/mongoid/utils/sluggable.rb', line 16

def generate_slug
  self.slug = title.parameterize.strip
end

#to_paramObject



12
13
14
# File 'lib/mongoid/utils/sluggable.rb', line 12

def to_param
  slug
end