lib/simple_states.rb in simple_states-0.0.11 vs lib/simple_states.rb in simple_states-0.1.0.pre1
- old
+ new
@@ -48,10 +48,10 @@
end
attr_reader :past_states
def init_state
- self.state = self.class.initial_state
+ self.state = self.class.initial_state if state.nil?
end
def past_states
@past_states ||= []
end