README.md in mongoid-urls-0.0.3 vs README.md in mongoid-urls-0.0.7
- old
+ new
@@ -10,35 +10,35 @@
## Mongoid::Urls
Simple slugs for mongoid models!
-## Short snappy token ids for Mongoid documents
+## Nice URLs for Mongoid Documents
This library is a quick and simple way to generate slugs
for your mongoid documents.
Mongoid::Urls can help turn this:
http://bestappever.com/video/4dcfbb3c6a4f1d4c4a000012
-Into something more like this:
+Into something like this:
http://bestappever.com/video/kittens-playing-with-puppies
## Getting started
In your gemfile, add:
gem 'mongoid-urls'
-In your Mongoid documents, just add `include Mongoid::Urls` and the
-`url` method will take care of all the setup, like so:
+In your Mongoid documents, just add `include Mongoid::Urls`
+and use the `url` method to setup, like so:
```ruby
-class Article
+class Video
include Mongoid::Document
include Mongoid::Urls
field :title
@@ -51,27 +51,37 @@
listed [below](#configuration).
## Finders
-`Mongoid::Urls` will **never** override `find`.
-There's some helpers for custom fields:
+`Mongoid::Urls` will **never** override `find`!
```ruby
Video.find_by_url("the-nice-url")
-Account.find_by_url("acc-123456")
```
+Or just:
+```ruby
+Account.find_url("acc-123456")
+```
+
## Configuration
You may choose between two different systems for how your urls are stored:
-Default #urls
+Simple: `#url` String only.
-Simple #url
+Default to simple + `#urls` Array for history (find when page moved).
#### Reserved
+Defaults to `%w(new edit)`.
+Have in mind: It's an overwrite, not a merge.
+
# Notes
+
+If you're looking for conflict resolution, check out `mongoid-slugs`.
+This gem intended to be used for manual conflict resolution (duplicates):
+Use your own logic and/or return conflict error to the user.