ECM Downloads 2

This version supports rails 4.x and twitter bootstrap 3. For legacy support use ecm_downloads

Migrating from 1.x.x to 2.0.0

Add active_admin-awesome_nested_set and active_admin-acts_as_list to your gemfile, if you are using activeadmin:

# Gemfile
gem 'active_admin-awesome_nested_set'
gem 'active_admin-acts_as_list'

Prerequisites

if you are using activeadmin as backend, ecm_cms2 comes with admin files to provide a backend. In that case, you'll need active_admin-awesome_nested_set and active_admin-acts_as_list. Add it to your gemfile:

# Gemfile
gem 'active_admin-awesome_nested_set'
gem 'active_admin-acts_as_list'

Installation

Add the gem to your bundle:

# Gemfile
gem 'ecm_downloads2'

Install your bundle:

> bundle install

Generate initializer:

> rails generate ecm:downloads:install

Add migrations:

> rake ecm_downloads_engine:install:migrations

Migrate:

> rake db:migrate

Add the routes:

# config/routes.rb
Ecm::Downloads::Routing.routes(self)

Add the helpers to your application controller:

# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
  helper Ecm::Downloads::DownloadCategoryHelper
  helper Ecm::Downloads::DownloadHelper
  ...
end

Optional: Generate locale files

You may want to copy the locales to your app:

> rails generate ecm:downloads:locales

Running specs

gem install bundler
bundle
cd spec/dummy && rake db:migrate RAILS_ENV=test && cd ../..
guard

License

This project rocks and uses MIT-LICENSE.