Skip to content

heliumdevelopment/comfortable-mexican-sofa

 
 

Repository files navigation

ComfortableMexicanSofa

Gem Version Gem Downloads Build Status Dependency Status Code Climate Coverage Status

ComfortableMexicanSofa is a powerful Rails 4 CMS Engine

Features

Installation

Add gem definition to your Gemfile:

gem 'comfortable_mexican_sofa', '~> 1.12.0'

Then from the Rails project's root run:

bundle install
rails generate comfy:cms
rake db:migrate

Now take a look inside your config/routes.rb file. You'll see where routes attach for the admin area and content serving. Make sure that content serving route appears as a very last item.

comfy_route :cms_admin, :path => '/admin'
comfy_route :cms, :path => '/', :sitemap => false

If you get an Invalid route name error, look inside your route file to see if there's already the CMS route being duplicated.

Add to application_controller.rb

alias_method :current_user, :current_comfy_user

layout :layout_by_resource

protected

def layout_by_resource
  if devise_controller?
    "comfy/backend"
  else
    "application"
  end
end

Adding settings

Within the comfortable_mexican_sofa.rb, add:

config.settings = %w( site_title )

Adding templates

If you want to add custom templates, add an item to the routes file for that template like:

controller :templates do
  get 'about', :action => 'about'
end

Then add app/views/templates/about.slim

About

ComfortableMexicanSofa is a powerful Rails 4 CMS Engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 49.8%
  • JavaScript 36.4%
  • CSS 7.0%
  • HTML 5.1%
  • CoffeeScript 1.5%
  • Roff 0.2%