Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kieranklaassen/mercury_rails_regions
A CMS like solution with Mercury-rails as an editor. Just make regions in your views and your admin can begin editing.
https://github.com/kieranklaassen/mercury_rails_regions
Last synced: 3 days ago
JSON representation
A CMS like solution with Mercury-rails as an editor. Just make regions in your views and your admin can begin editing.
- Host: GitHub
- URL: https://github.com/kieranklaassen/mercury_rails_regions
- Owner: kieranklaassen
- License: mit
- Created: 2012-11-28T15:01:11.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-28T15:03:52.000Z (almost 12 years ago)
- Last Synced: 2024-04-23T20:24:43.830Z (5 months ago)
- Language: Ruby
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MercuryRailsRegions
Add mercury-regions to a view and save the content to the database.
## Installation
Add this line to your application's Gemfile:
gem 'mercury_rails_regions'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mercury_rails_regions
Run the rails generator to add the page model
$ rails generate mercury_regions:install:pages_model
$ rails db:migrate## Usage
To add an editable region to your view use the following code
``` erb
About
<%= mercury_region "about-introduction" %><%= mercury_region "about-aside" %>
```
When current_admin_user.signed_in? and you go to `/editor/about` this will render as follows:
``` htmlAbout
contents intro
contents aside```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request