Blog

Create posts and categories, nothing more.

Installation

  1. Include gem to the Gemfile ruby gem 'blog', git: 'git@bitbucket.org:werein/blog.git'
  2. Mount it like Rails engine ruby mount Blog::Engine => '/blog'
  3. Install engine rails g blog:install

Configuration

You need to specify User class with has_role? method. It determinate if user have access to given action.

Create config/initializers/blog.rb file with following:

Blog.user_class = 'User'

or dummy user class

Blog.user_class = 'Tuberack::DummyUser'

Abilities

Blog has some default abilities

Unauthorized user, user

Admin

Attributes

On every model can be set different attributes.

Post

Category

Front-end

Engine provide bootstrap styled view and javascript functions for blog. Just load them in your application.css.sass and application.js.coffee. Plese check requirements.sass/coffee for libraries used in blog engine.

@import blog/app
#= require blog/app

Components

Are parts of application. They can be rendered whatever you want. On each component can specified view. There are list of components and views.

Example
render_cell 'blog/category', :show

Category

** Views **

Posts