Matt-Yorkley
5725989343
Fix deprecated syntax in old controller helper
...
This syntax for rendering a file isn't valid in Rails 6.x...
2021-07-31 13:11:10 +01:00
Matt-Yorkley
2d69810c5d
Convert CalculatedAdjustments into a proper Concern and remove class_eval
2021-07-24 21:28:13 +01:00
Nihal Mohammed
e5bdaa603a
Setup pagy
2021-07-14 13:17:33 +01:00
Andy Brett
334b9b520a
removed deprecated calls to force_ssl; rely on config.force_ssl
2021-06-24 11:58:33 -07:00
Andy Brett
df0c98d013
Merge branch 'master' into rails61
2021-06-24 08:02:58 -07:00
Luis Ramos
e52937c113
Use rubocop auto correct to add frozen string literal to all files
...
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Luis Ramos
43401e4b5e
Fix double spree scope in i18n
...
Fix taken from spree: efba9f1a02
2021-06-13 18:19:29 -07:00
Matt-Yorkley
2de442f44d
Move taxing of enterprise fees to TaxRate
2021-06-06 20:16:03 +01:00
Matt-Yorkley
8c9733d8da
Remove included tax check from CalculatedAdjustments
...
This is handled in TaxRate now.
2021-06-06 20:16:03 +01:00
Andy Brett
d197b81351
Merge pull request #7606 from luisramos0/deprecation
...
[Rails 6.1] Fix deprecation warning in rails 6.0
2021-06-04 07:42:50 -07:00
Matt-Yorkley
7d38bec26d
Remove Spree::Config[:allow_ssl_in_development_and_test]
...
Unconditionally disables forced https-redirects in dev and test
2021-06-03 20:52:09 +01:00
Luis Ramos
cb6e626193
Remove require rails/all, this is already done in application.rb where we are loading only the rails modules we need
2021-06-01 22:34:04 +01:00
Matt-Yorkley
5868765087
Merge pull request #7673 from Matt-Yorkley/spree-config-caching
...
Fix clashing loggers
2021-05-25 11:09:33 +02:00
Matt-Yorkley
6377736f43
Allow :site_url to be picked up from ENV vars
2021-05-24 14:58:53 +01:00
Matt-Yorkley
1f6d872fa5
Add Spree copyright notice
2021-05-20 10:25:48 +01:00
Luis Ramos
d308e20871
Fix deprecation warning in rails 6.0
...
Warning: Class level methods will no longer inherit scoping from create in Rails 6.1
2021-05-10 21:03:24 +01:00
Andy Brett
6f20a23d47
Merge pull request #7436 from coopdevs/remove-duplicate-method
...
Replace duplicate #unauthorized method with module inclusion
2021-04-25 11:26:12 -07:00
Pau Perez
e5eb68dffc
Replace duplicate method with module inclusion
...
No reason to risk diverging their implementations. They are exact
copies.
Likewise, there's no need to have to I18n keys with almost the same
content.
2021-04-23 12:03:11 +02:00
Matt-Yorkley
6dc23804a1
Merge pull request #7425 from mkllnk/application-record
...
Add ApplicationRecord for customisations of models
2021-04-21 23:18:03 +02:00
Andy Brett
aca19edd3b
Merge pull request #7421 from andrewpbrett/rails-5-2-prep-2
...
Prepare for Rails 5.2
2021-04-19 11:32:21 -07:00
Maikel Linke
5c0cdce597
Confine Permalinks patch to application
...
We were also patching ActiveRecord::Relation for the `#find_by_param`
methods but we are not using those any more. They were deprecated a
while ago. We now use `find_by(permalink: ...)`.
2021-04-15 15:59:03 +10:00
Maikel Linke
1893313c40
Confine DelegateBelongsTo patch to our app
2021-04-15 15:59:03 +10:00
Matt-Yorkley
6f8ade52eb
Persist last_ip_address when loading current_order
...
Leaving the object with unpersisted changes breaks order locking with this error (in various places):
RuntimeError:
Locking a record with unpersisted changes is not supported. Use `save` to persist the changes, or `reload` to discard them explicitly.
2021-04-14 09:14:58 -07:00
Matt-Yorkley
e323d016a2
Simplify arguments of #create_adjustment method
2021-04-14 12:01:21 +01:00
Matt-Yorkley
4bd7f964d0
Fix LocalizedNumber issues
2021-04-13 16:56:03 -07:00
Andy Brett
67e41f4548
remove check for connected?
2021-04-13 16:55:49 -07:00
Matt-Yorkley
39fa315ecc
Guard against calls to the database during db:create
...
Rails 5.2 has changed the way initializers are called during certain rake tasks including `db:create`. Initializers that were previously not loaded are now loaded (basically the whole app is loaded). This means any calls to #table_exists? that appear in the app will throw fatal errors as the database doesn't exist yet during that task, but those calls are made before `db:create` has even started, which means the database can't be created.
There are also a few other places in Spree code where #table_exists? is called, and they already call #connected? first to guard against this issue.
2021-04-13 16:55:19 -07:00
Matt-Yorkley
7d3288ca53
Remove #to_package calls on shipment calculations
2021-04-04 19:19:06 +01:00
Matt-Yorkley
fcb8145a6c
Bring in changes to Adjustment#update! and CalculatedAdjustments#update_adjustment
2021-03-30 16:39:40 +01:00
Matt-Yorkley
0f5af2d9f1
Merge pull request #6927 from Matt-Yorkley/adjustments-payment-fee
...
[Adjustments] Payment fee adjustment
2021-03-25 17:40:53 +01:00
Matt-Yorkley
5f4e3c75c7
Update deprecated errors.set syntax
...
DEPRECATION WARNING: ActiveModel::Errors#set is deprecated and will be removed in Rails 5.1. Use model.errors.add(:preferred_discount_amount, ["has an invalid format. Please enter a number."]) instead. (called from block (2 levels) in localize_number at /home/runner/work/openfoodnetwork/openfoodnetwork/lib/spree/localized_number.rb:38)
2021-03-23 20:11:59 +00:00
Matt-Yorkley
5840b0e33c
Adapt adjustment interface for payment's adjustment being singular
...
Payments only have one adjustment, all other adjustable objects have adjustments (plural).
2021-03-23 18:19:37 +00:00
Andy Brett
afa7269f48
Merge branch 'master' into render_plain
2021-03-18 10:53:13 -07:00
Matt-Yorkley
237075dd47
Replace deprecated before_filter syntax
2021-03-17 15:15:26 +00:00
Luis Ramos
cb8fd2131e
Use body: nil instead of deprecated nothing:
...
Ideally we would be using render head status but it's issuing quite a lot of double render problems, we can improve later
2021-03-16 23:13:58 +00:00
Pau Perez
0eb14bc0a4
Do not modify the HTML returned by Money gem
...
It was due to these lines that we were returning a broken HTML tag but
also, there's no need to remove blanks.
2021-03-10 16:29:09 +01:00
Pau Perez
96bcde61a3
Fix Money deprecation warning with :html_wrap
...
This fixes the following deprecation warning
```
[DEPRECATION] `html` is deprecated - use `html_wrap` instead. Please
note that `html_wrap` will wrap all parts of currency and if you use
`with_currency` option, currency element class changes from `currency`
to `money-currency`.
```
2021-03-08 13:03:00 +01:00
Pau Perez
485449e289
Fix Money gem deprecation warning with :format
...
This removes millions of deprecation warnings like the following
```
[DEPRECATION] `symbol_position: :before` is deprecated - you can replace it with `format: %u %n`
```
from the build. It gets printed every time a `Spree::Money` is instantiated.
This should result in a non-negligible speed up of the test suite.
2021-03-08 13:03:00 +01:00
Matt-Yorkley
12a513c54c
Apply an upstream fix to Spree::I18n
...
See: fe95f637c9
Fixes error mentioned in the above Spree commit.
2021-02-08 22:14:42 +00:00
Maikel
173cf9e536
Merge pull request #6565 from Matt-Yorkley/adjustments-inclusive
...
[Adjustments] Improve inclusive/additional tax recording
2021-02-08 09:38:31 +11:00
Maikel
8a757812e7
Merge pull request #6735 from coopdevs/enable-mail-delivery-always
...
Enable mail delivery always
2021-01-28 09:31:12 +11:00
Pau Pérez Fabregat
9fe2cb1a30
Merge pull request #6681 from luisramos0/css
...
[Rails 5] Make the app work in rails 5
2021-01-27 12:08:27 +01:00
Pau Perez
4a5869b60c
Remove ability to toggle mail delivery
...
OFN requires mails to work so there's no point in having this
conditional with the maintenance cost it entails.
2021-01-25 13:27:44 +01:00
Matt-Yorkley
a328a9bc1b
Use included boolean in tax adjustments
2021-01-23 03:59:32 +00:00
Andy Brett
0e7f4b2f14
Merge pull request #6537 from mkllnk/simplify-mail-config
...
Simplify mail config
2021-01-21 10:59:43 -08:00
Pau Pérez Fabregat
8b01c9c8ba
Merge pull request #6279 from luisramos0/base_controller
...
Merge Spree::BaseController with ApplicationController and merge StoreController with ::BaseController
2021-01-19 15:52:47 +01:00
Maikel
334e270a11
Merge pull request #6552 from Matt-Yorkley/adjustments-order-association
...
[Adjustments] Associate all adjustments with an order
2021-01-19 08:43:13 +11:00
Luis Ramos
7c9024101b
Some css fixes to make it all work in rails 5
2021-01-15 23:26:37 +00:00
Luis Ramos
4060e7debf
Replace usages of Spree::BaseController with ApplicationController
2021-01-15 21:59:16 +00:00