app/models/effective/order.rb
def create_as_pending!
      return false unless new_record?

      self.purchase_state = EffectiveOrders::PENDING

      self.skip_buyer_validations = true
      self.addresses.clear if addresses.any? { |address| address.valid? == false }

      save!

      send_payment_request_to_buyer! if send_payment_request_to_buyer?

      true
    end
# This is called from admin/orders#create
# This is intended for use as an admin action only
# It skips any address or bad user validations
This is called from admin/orders#create
This is intended for use as an admin action only
It skips any address or bad user validations
This is called from admin / orders#create This is intended for use as an admin action only It skips any address or bad user validations
def create_as_pending!
      return false unless new_record?
      self.purchase_state = EffectiveOrders::PENDING
      self.skip_buyer_validations = true
      self.addresses.clear if addresses.any? { |address| address.valid? == false }
      save!
      send_payment_request_to_buyer! if send_payment_request_to_buyer?
      true
    end
def create_as_pending! return false unless new_record? self . purchase_state = EffectiveOrders :: PENDING self . skip_buyer_validations = true self . addresses . clear if addresses . any? { | address | address . valid? == false } save! send_payment_request_to_buyer! if send_payment_request_to_buyer? true end
This is called from admin/orders#create
This is intended for use as an admin action only
It skips any address or bad user validations
This is called from admin / orders#create This is intended for use as an admin action only It skips any address or bad user validations