No description, website, or topics provided.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
MIT-LICENSE
README.markdown
Rakefile
acts_as_publishable.gemspec

README.markdown

ACTS_AS_PUBLISHABLE Gem

This gem is derived from the acts_as_publishable plugin in bborn's communityengine

It allows an ActiveRecord model to move through publishing stages (draft, live, deleted, etc.).

WARNING

This gem is not complete yet--I have used it successfully in a project, but incorporate at your own risk. If you do try it, feel free to file reports for any bugs you encounter.

Installation

  1. Add the gem to your Gemfile:

    gem 'acts_as_publishable'

  2. Add the acts_as_publishable macro to your model, e.g.

    class BlogPost < ActiveRecord::Base

    requires at least :draft and :live as arguments

    acts_as_publishable(:draft, :live, :deleted) end

  3. Generate a migration for the additional columns

    rails g acts_as_publishable:migrate [model]

  4. Migrate your database schema

    rake db:migrate