Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 629 Bytes

README.rdoc

File metadata and controls

33 lines (22 loc) · 629 Bytes

acts_as_span

ActiveRecord model w/ a start_date and an end_date

Getting Started

In your Gemfile:

gem "acts_as_span"

In your model:

class SpanRecord < ActiveRecord::Base
  acts_as_span
end

In your migrations:

class AddSpanToSpanRecord < ActiveRecord::Migration
  def self.up
    add_column :span_records, :start_date, :date
    add_column :span_records, :end_date, :date
  end

  def self.down
    remove_column :span_records, :start_date
    remove_column :span_records, :end_date
  end
end

Copyright © 2011 Annkissam. See LICENSE for details.