diff options
-rw-r--r-- | activemodel/lib/active_model/state_machine/machine.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/state_machine/machine.rb b/activemodel/lib/active_model/state_machine/machine.rb index 58c2f1b200..a5ede021b1 100644 --- a/activemodel/lib/active_model/state_machine/machine.rb +++ b/activemodel/lib/active_model/state_machine/machine.rb @@ -4,7 +4,8 @@ require 'active_model/state_machine/event' module ActiveModel module StateMachine class Machine - attr_accessor :initial_state, :states, :events, :state_index + attr_writer :initial_state + attr_accessor :states, :events, :state_index attr_reader :klass, :name def initialize(klass, name, options = {}, &block) |