An open API service indexing awesome lists of open source software.

https://github.com/tomasc/mongo_mapper_permalink_datatype

[DEAD] MongoMapper datatype that automatically creates slugs from strings
https://github.com/tomasc/mongo_mapper_permalink_datatype

Last synced: 2 months ago
JSON representation

[DEAD] MongoMapper datatype that automatically creates slugs from strings

Awesome Lists containing this project

README

          

MongoMapper datatype that automatically creates slugs from strings that can be used in URLs.

See test for more details.

== Example

require 'mongo_mapper/datatypes/permalink'

class Category
include MongoMapper::Document

key :title, String
key :permalink, Permalink

before_save :set_permalink

def set_permalink
self.permalink = title
end
end

== Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a future version unintentionally.
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 Tomas Celizna, released under the MIT license