Ruby on rails content management system
JavaScript Ruby HTML CSS
Latest commit e155cfb Sep 11, 2017 @billyswifty billyswifty Updated version file
Failed to load latest commit information.
app More changes Sep 11, 2017
bin More changes May 23, 2014
config More changes Sep 11, 2017
db/migrate Removed .DS_Store Aug 13, 2013
lib Updated version file Sep 11, 2017
psd Various changes Aug 5, 2013
script Initial commit May 24, 2013
spec More changes Nov 13, 2014
test Initial commit May 24, 2013
.gitignore More changes May 23, 2014
.gpig Added rake task to correct table sequences. Dec 13, 2013
Gemfile More changes Jan 31, 2017
Gemfile.lock More changes Aug 27, 2015
MIT-LICENSE Updated MIT-LICENSE Jul 11, 2013 More changes Jun 5, 2013
Rakefile More changes Nov 13, 2014
caboose-cms.gemspec More changes Jan 3, 2017
changelog.txt More changes Jan 2, 2017
eval_test.rb Added support for custom block types Jan 15, 2014

Caboose CMS

Caboose is a simple yet flexible and powerful content management system that runs on top of ruby on rails. It handles users, roles, permissions, and the login process. In addition, it handles content pages and their URLs. It has a layout system that allows a developer to easily customize the look and feel of each page.


Install the caboose-cms gem:

$ gem install caboose-cms

Create a new rails app configured to use Caboose:

$ caboose new my_caboose_app

Now go create a local MySQL database called my_caboose_app_development. Then let Caboose install the database:

$ cd my_caboose_app
$ rake caboose:db

That's it! To test it out, start your rails server:

$ rails server

And go check out http://localhost:3000


Caboose already handles the page editing process, but you need to be able to control the layout for each of those pages. You do that with layouts. Caboose has a simple layout system. You control which layout each page uses. There are three options:

Default layout:

The layout that any page by default will use if any other layout options are not set. This layout resides in the layout_default.html.erb file.

Per page layout:

Just create a new layout called layout_<page_id>.html.erb.

Example: layout_37.html.erb

Per type layout:

If you need multiple pages to use a common layout, just create a layout with a name.

Examples: layout_about.html.erb, layout_listing.html.erb

For each layout, a few things must exist in the layout for it to work properly with Caboose. You must include the following:

  • CSS and CSRF in the head:

    <%= yield :css %>
    <%= csrf_meta_tags %>
  • The top nav login/control panel link:

    <%= render :partial => 'layouts/caboose/top_nav' %>
  • The top nav login/control panel link:

    <%= render :partial => 'layouts/caboose/top_nav' %>
  • The station and javascript in the footer:

    <%= render :partial => 'layouts/caboose/station' %>
    <%= yield :js %>

You have access to the @page object in the layout. Here's a bare-bones example of all the elements:

<!DOCTYPE html>
<title>My App</title>
<%= yield :css %>
<%= csrf_meta_tags %>
<%= render :partial => 'layouts/caboose/top_nav' %>

<h1><%= raw @page.title %></h1>
<%= raw @page.content %>  

<%= render :partial => 'layouts/caboose/station' %>
<%= yield :js %>


To add new functionality to the Caboose station, extend the Caboose::CaboosePlugin object and override the methods you'd like to implement. The existing hooks are the following:

String page_content(String str)
Manipulate the page content before it's shown on the screen.
Array admin_nav(Array arr)
Add items to the navigation that appears in the Caboose station.