Acts As Page
Installation
Add the following to your Gemfile
:
gem 'mongoid_acts_as_page'
Run bundle install:
$ bundle install
Usages
Add the following to your model and enjoy:
include ActsAsPage
You can use field "name" to set or get name of page:
page = YourModel.new name: 'new_page'
page.name #=> new page
Use method 'seo' for get or set seo information of the page like a title, keywords or description
page = YourModel.new name: 'new_page'
page.seo.title #=> new page
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request