Acts As Page
Installation
Add the following to your Gemfile:
gem 'mongoid_acts_as_page'Run bundle install:
$ bundle installUsages
Add the following to your model and enjoy:
include ActsAsPageYou can use field "name" to set or get name of page:
page = YourModel.new name: 'new_page'
page.name #=> new pageUse 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 pageContributing
- 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