Method: Spree::Core::StateMachines::Order#checkout_steps

Defined in:
lib/spree/core/state_machines/order.rb

#checkout_stepsObject



218
219
220
221
222
223
224
225
226
227
# File 'lib/spree/core/state_machines/order.rb', line 218

def checkout_steps
  steps = self.class.checkout_steps.each_with_object([]) { |(step, options), checkout_steps|
    next if options.include?(:if) && !options[:if].call(self)

    checkout_steps << step
  }.map(&:to_s)
  # Ensure there is always a complete step
  steps << "complete" unless steps.include?("complete")
  steps
end