A ruby state machine for ActiveRecord implemented with the state pattern