module ContentfulRails::Sluggable

A quick mixin to slugify a field other than 'slug' NOTE that if you include sluggable (and define a slug field) in a class which responds to slug() than you'll get a stack level too deep error.

Public Instance Methods

slug() click to toggle source

Returns the slugified version of the :slug_field

# File lib/contentful_rails/sluggable.rb, line 13
def slug
  send(self.class.slug_field).parameterize(ContentfulRails.configuration.slug_delimiter) if self.class.slug_field.present?
end