0.01
No commit activity in last 3 years
No release in over 3 years
Converts ActiveAdmin into a simple CMS
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Project Readme

ActiveAdmin Cms

Build Status Code Climate

A simple CMS extension for ActiveAdmin.

Getting Started

First you need to add ActiveAdmin Cms to your gemfile and run a bundle install

# Gemfile
gem 'activeadmin-cms'
# On command line
> bundle install

Run active admin install

If you haven't already run the ActiveAdmin install generator, do this first.

> rails g active_admin:install

Follow the on-screen instructions.

The default user has a login of 'admin@example.com' and a password of 'password'.

Run CMS install

> rails g active_admin:cms:install

Configure Fog

Create a new file in config/initializers called fog.rb to setup fog.

# config/initializers/fog.rb
CarrierWave.configure do |config|
  config.fog_credentials = {
    :provider               => 'AWS',
    :aws_access_key_id      => '-aws-access-key-',
    :aws_secret_access_key  => '-aws-secret-,
    :region => 'eu-west-1'
  }
  config.fog_host  = "//mywebsite.co.uk.s3.amazonaws.com"
  config.fog_directory  = "mywebsite.co.uk"
end

Generate a page class

> rails g active_admin:cms:page Page

Generate a recipe

> rails g active_admin:cms:recipe Default

You will need to also create a migration to insert a database record for the recipe

> rails g migration AddDefaultRecipe
# db/migrations/123456789_add_default_recipe.rb
class AddDefaultRecipe < ActiveRecord::Migration
  def up
    r = Recipes::Default.new
    r.title = 'Default'
    r.type = 'Recipes::Default'
    r.save
  end

  def down
  end
end