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
- Host: GitHub
- URL: https://github.com/tomasc/mongo_mapper_permalink_datatype
- Owner: tomasc
- Created: 2010-12-09T11:08:21.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-02-27T20:57:28.000Z (over 15 years ago)
- Last Synced: 2025-02-25T15:49:41.321Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
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