Adds state machine support to Governor.
Ruby JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
lib
spec
.document
.gitignore
.rspec
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION
governor_states.gemspec

README.rdoc

governor_states

Governor (named after Rod Blagojevich) is the pluggable blogging platform for Rails, built for people who want to build their blog into their website, not build their website into their blog.

governor_states is a plugin for Governor, allowing you to mark articles as a draft, published, or hidden, using an underlying state machine.

Dependencies

Setting up

In your Gemfile, add the following:

gem 'governor'
gem 'state_machine'
gem 'governor_states'

Once you've installed the gem into your app, you need to run the generator:

rails generate governor:add_state [RESOURCE]

This will add a migration for adding a state column to your article table.

At this point, any existing articles will be marked as drafts, so you'll have to manually choose which articles to publish.

Contributing to governor_states

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright © 2011 Liam Morley. See LICENSE.txt for further details.