lib/aasm/base.rb in aasm-3.0.3 vs lib/aasm/base.rb in aasm-3.0.4

- old
+ new

@@ -5,16 +5,16 @@ sm = AASM::StateMachine[@clazz] sm.config.column = options[:column].to_sym if options[:column] if options.key?(:whiny_transitions) sm.config.whiny_transitions = options[:whiny_transitions] - else + elsif sm.config.whiny_transitions.nil? sm.config.whiny_transitions = true # this is the default, so let's cry end if options.key?(:skip_validation_on_save) sm.config.skip_validation_on_save = options[:skip_validation_on_save] - else + elsif sm.config.skip_validation_on_save.nil? sm.config.skip_validation_on_save = false # this is the default, so don't store any new state if the model is invalid end end def state(name, options={})