Skip to content

Instantly share code, notes, and snippets.

View manishdas's full-sized avatar

Manish Das manishdas

View GitHub Profile
@manishdas
manishdas / contact.rb
Created September 15, 2011 19:10 — forked from the-architect/contact.rb
Automatically create scopes for all available state_machine states in Rails 3.1
class Contact < ActiveRecord::Base
state_machine :state, :initial => :imported do
state :imported
state :contacted
state :verified
state :prospect
state :deleted
end