lib/aasm/base.rb in aasm-3.0.19 vs lib/aasm/base.rb in aasm-3.0.20

- old
+ new

@@ -10,9 +10,15 @@ @state_machine.config.whiny_transitions = options[:whiny_transitions] elsif @state_machine.config.whiny_transitions.nil? @state_machine.config.whiny_transitions = true # this is the default, so let's cry end + if options.key?(:create_scopes) + @state_machine.config.create_scopes = options[:create_scopes] + elsif @state_machine.config.create_scopes.nil? + @state_machine.config.create_scopes = true # this is the default, so let's create scopes + end + if options.key?(:skip_validation_on_save) @state_machine.config.skip_validation_on_save = options[:skip_validation_on_save] elsif @state_machine.config.skip_validation_on_save.nil? @state_machine.config.skip_validation_on_save = false # this is the default, so don't store any new state if the model is invalid end