Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 445 Bytes

README.md

File metadata and controls

22 lines (14 loc) · 445 Bytes

state_machine forked from pluginaweek/state_machine

Changelog:

A hash with {name: :state_name, value: state_value} can be passed in initial.

Why?

In previous implementation

  class Bike

    PARKED  = 0

    state_machine attribute: :status, :initial => :parked do
      state :parked, value: Bike::PARKED
    end

  end

would initialize with status "parked"