def save
      self.attributes.stringify_keys!
      self.attributes.delete('customer')
      self.attributes.delete('product')
      self.attributes.delete('credit_card')
      self.attributes.delete('bank_account')
      self.attributes.delete('paypal_account')

      self.attributes, options = extract_uniqueness_token(attributes)
      self.prefix_options.merge!(options)
      super
    end
def save
      self.attributes.stringify_keys!
      self.attributes.delete('customer')
      self.attributes.delete('product')
      self.attributes.delete('credit_card')
      self.attributes.delete('bank_account')
      self.attributes.delete('paypal_account')

      self.attributes, options = extract_uniqueness_token(attributes)
      self.prefix_options.merge!(options)
      super
    end
Strip off nested attributes of associations before saving, or type-mismatch errors will occur