Cmshelper

Features

Basic:

  • Allows to manage text pages
  • Allows to manage text blocks
  • Allows set/edit meta tags for each request
  • Auto adding number of page to the title
  • Other useful helpers

Also you can enable:

  • News
  • Mentions
  • Feedbacks

Requirements

Rcms designed to work with:

  • activeadmin
  • kaminari
  • carrierwave
  • activerecord
  • friendly_id

Installation

gem 'rcms', '0.2.0'

or

gem 'rcms', github: 'r1dd1ck777/rcms'

Usage

Main idea is generate file skeleton and allow you to change it in development

Basic features becomes available after:

$ rails g rcms $ rake db:migrate Will generate models, activeadmin resources, controllers, views and patch routes.rb Also it will add some methods and helpers to ApplicationController

Helpers:

apply_meta_tags title: 'Foo', 'og:image': 'http://some/url.jpg'

or pass an entity if it responds to :meta_tags

rcms_page = Rcms::Page.find 'foo-bar-slug'
apply_meta_tags rcms_page
# rcms_page.meta_tags => hash

News

News feature: allows you to manage news from admin panel and show them on frontend

$ rails g rcms_tidings
$ rake db:migrate

Will generate models, activeadmin resources, controllers, uploaders, views and patch routes.rb

Mentions

Mentions feature: guest users can add their mention, and you can manage it at admin panel

$ rails g rcms_mentions
$ rake db:migrate

Will generate models, activeadmin resources, controllers, views and patch routes.rb

Feedbacks

Feedbacks feature: allows users to send feedbacks to admins by emails

$ rails g rcms_feedbacks

Will generate controllers, views and patch routes.rb

Backlog

  • other locales
  • tests

License

The gem is available as open source under the terms of the MIT License.