Sha256: b2fa02d80b63f3dd39c1da52c2eb13c279616481e8dd8abc5de3693448d611c1

Contents?: true

Size: 277 Bytes

Versions: 16

Compression:

Stored size: 277 Bytes

Contents

require './helper'

class SlugizerEx
  include MongoMapper::Document
  include MongoMapperExt::Slugizer

  slug_key :title, :unique => true

  key :title
end

u = SlugizerEx.create(:title => "The title of the blogpost!!!")

puts u.slug
puts SlugizerEx.by_slug(u.slug).inspect

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mongomapper_ext-0.5.2 examples/slugizer.rb
mongomapper_ext-0.5.1 examples/slugizer.rb
mongomapper_ext-0.5.0 examples/slugizer.rb
mongomapper_ext-0.4.0 examples/slugizer.rb
mongomapper_ext-0.3.0 examples/slugizer.rb
mongomapper_ext-0.2.4 examples/slugizer.rb
mongomapper_ext-0.2.3 examples/slugizer.rb
mongomapper_ext-0.2.2 examples/slugizer.rb
mongomapper_ext-0.2.1 examples/slugizer.rb
mongomapper_ext-0.2.0 examples/slugizer.rb
mongomapper_ext-0.1.5 examples/slugizer.rb
mongomapper_ext-0.1.4 examples/slugizer.rb
mongomapper_ext-0.1.3 examples/slugizer.rb
mongomapper_ext-0.1.2 examples/slugizer.rb
mongomapper_ext-0.1.1 examples/slugizer.rb
mongomapper_ext-0.1.0 examples/slugizer.rb