/blogit-admin

Admin actions for the blogit rails engine

Primary LanguageRubyMIT LicenseMIT

Gem Version Code Climate Test Coverage Blogit-admin Travis CI Bitdeli Badge

Blogit Admin

An admin backend for the Blogit project

Installation

Follow the installation instructions for blogit first of all.

To install blogit-admin...

Add this to your Gemfile

gem "blogit-admin"

...and run bundle install to install the gem.

Next, run:

bundle install

then add the following to your routes.rb file:

# config/routes.rb
mount Blogit::Admin::Engine => "/blog/admin"

Authentication

Blogit-Admin is not an authentication solution. Authentication is too application specific. Instead, we expect you to add your own authentication solution.

To make sure this works as expected with Blogit Admin, please make sure your ApplicationController defines the following methods:

# Checks that the current user has permission to access the current action.
#   This method may redirect if you prefer.
#
# Returns true if the user (Blogger) is permitted
# Returns false if the user (Blogger) is not permitted
def authenticate_blogger
end

# The sign out URL to leave the admin dashboard 
#
# Returns a String with a URL path that your application must recognised with a DELETE HTTP request
def blogit_admin_sign_out_url
end

# The currently signed in Blogger. Must be an instance of an ActiveRecord::Base model that blogs (you've called the `blogs` method)
# 
# Returns an ActiveRecord::Base subclass instance
def current_blogger
end

Configuration

Running rails g blogit:install will add an initializer file named blogit.rb. In here you can set various configuration options. Please read the documentation for a full list of the options available.

Issues

If you discover a problem with Blogit or Blogit Admin, please let us know about it.

Remember to search the issues list first in case your issue has already been raised by another Githuber

Documentation

Full documentation is available here: http://rubydoc.info/gems/blogit-admin

Contributing

You're welcome to contribute to the Blogit project. Please consult the contribution guidelines for more info.

Legal Stuff

Copyright © 2011-2015 Katana Code Ltd.

See LEGAL for full details.

Credits

Developed by Katana Code

About Katana Code

Katana Code are web developers based in Edinburgh, Scotland.