DEPRECATION WARNING: It looks like you are eager loading table(s) (one of: variant_overrides, enterprises, enterprise_roles) that are referenced in a string SQL snippet. For example:
Post.includes(:comments).where("comments.title = 'foo'")
Currently, Active Record recognizes the table in the string, and knows to JOIN the comments table to the query, rather than loading comments in a separate query. However, doing this without writing a full-blown SQL parser is inherently flawed. Since we don't want to write an SQL parser, we are removing this functionality. From now on, you must explicitly tell Active Record when you are referencing a table from a string:
Post.includes(:comments).where("comments.title = 'foo'").references(:comments)
If you don't rely on implicit join references you can disable the feature entirely by setting `config.active_record.disable_implicit_join_references = true`. (called from collection at /home/user/Github/openfoodnetwork/app/controllers/admin/variant_overrides_controller.rb:77)
A new custom email validator class was added to Spree::Order, and currently it fails every time (breaking lots of specs). This ugly hack disables it for now.
DEPRECATION WARNING: The :restrict option is deprecated. Please use :restrict_with_exception instead, which provides the same functionality. (called from block in <top (required)> at /home/user/Github/openfoodnetwork/app/models/spree/address_decorator.rb:4)
Rails 4 now returns an Activerecord::Relation when using `SomeModel.all`. To get all the objects (as in Rails 3) we need to use `SomeModel.all.to_a`. See: https://stackoverflow.com/a/22417170
This process mimicks the existing process of generating a token on the connected account from a card on the platform account. In the Payment Intents API we need to create a payment method in the connected account, a token is not enough
Here we are copy pasting and adding stripe SCA because we are planning to delete the StripeConnect that will be replaced by the stripe sca implementation
We need to set the stripe object with the stripe account id to work with the payment intents api but we cannot set it to work with the stripe charges api
This makes the two payment methods incompatible: a given enterprise cannot use both the old stripe integration and this new one at the same time.
If we had multiple failed payments and then a successful payment, the
order confirmation was displaying the payment method of the first failed
payment. That was confusing and is now changed to the last payment
method.
Don't allow for HTML and potentially bad scripts. But this also prevents
accidental display errors. If someone wrote, "We only take <cash>", it
would mess with the site.