Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add permalinks to your mongoid models

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 permoid.gemspec
README.md

Permoid

Add permalinks to your Mongoid Models

Requirements

  • Ruby, 1.8.7 or 1.9.2
  • Mongoid 2.0.0

Use

  • Install the gem and include it to your project/Gemfile.
  • Define a model with a permalink :

    class Testing include Mongoid::Document include Permoid::Base

     field   :title
     validates_presence_of :title
    

    end

Go roll !

Warning !

Currently, the gem relies on the title field to build the permalink. There's no way to change that (yet).

Contributing

If you think Permoid is great but can be improved, feel free to contribute. To do so, you can :

  • Fork the project
  • Do your changes and commit them to your repository
  • Test your changes. We won't accept any untested contributions (except if they're not testable).
  • Create an issue with a link to your commits.

And that's it! We'll soon take a look at your issue and review your changes.

Credits

Damien MATHIEU :: 42 (AT|CHEZ) dmathieu.com

Something went wrong with that request. Please try again.