Publishable


  gem install publishable

Setup

you need a datetime column called published_at in your table and call publishable in your class body


  class Album < ActiveRecord::Base
    publishable
  end

Methods


  album = Album.new

  album.published?    # => false
  album.publish!      # calls :save afterwards
  album.published?    # => true

  Album.published.all # => finds all published albums

Copyright © 2010 Martin Linkhorst, released under the MIT license.