README.md in revelry_content-0.0.1.1 vs README.md in revelry_content-0.0.1.2

- old
+ new

@@ -3,74 +3,32 @@ RevelryContent is a gem for managing admin-editable content within Rails applications. # Installation -Add it to your gemfile. +Either install from a rails template: -Then run: - -```bash -bundle install -rails g revelry_content:install -rake db:migrate +```shell +rails new APPNAME -m https://raw.githubusercontent.com/revelrylabs/revelry_content/master/template.rb ``` -Mount the engine in your routes.rb file: +Or add it to your gemfile: ```ruby -mount RevelryContent::Engine => "/revelry_content" +gem 'revelry_content' ``` -Include RevelryContent::WithRevelryContent in any controllers which need to show editable -content. You probably want to include it in ApplicationController like so: +and install it: -```ruby -class ApplicationController - include RevelryContent::WithRevelryContent - def index; end -end +```shell +bundle +rails g revelry_content:install ``` -And include the editor javascript: -```javascript -//= require revelry_content -``` - -Add include the editor stylesheet: -```css -/* -*= require revelry_content/application -*/ -``` - - # Configuration -## Configuring authentication - -```ruby -RevelryContent.configure do |config| - config.user_for_content do |controller| - # Your authentication logic here - controller.current_user - end -end -``` - -## Configuring authorization - -You can set a block which takes two params `user` and `content` to handle authorization. -True is authorized, false is unauthorized. - -```ruby -RevelryContent.configure do |config| - config.authorization_policy do |user| - # Your authorization logic here - user.admin? - end -end -``` +The installer makes an initializer in `config/initializer.rb`. You can edit it +to customize authenticiation, authorization or javascript export settings. ## Configuring file uploads RevelryContent uses [carrierwave](https://github.com/carrierwaveuploader/carrierwave) to store image uploads. You'll want to configure carrierwave appropriately for your app.