Luis Ramos
0152b4da55
Fix rubocop issues
2020-11-27 13:59:46 +00:00
Luis Ramos
2a03e42f2a
Update deep_munge patch to rails 4.1 where the code is now in ActionDispatch::Request::Utils
2020-11-27 13:59:46 +00:00
Matt-Yorkley
01a726d9bd
Fix stubbing of stock totals
...
Recent changes to the way count_on_hand is summed in Spree::Stock::Quantifier mean the old method here will not work. Error:
```
2) Spree::Variant#in_stock? when stock_items are not backorderable when stock_items out of stock return false if stock_items out of stock
Failure/Error: expect(variant.in_stock?).to be_falsy
expected: falsey value
got: true
# ./spec/models/spree/variant_spec.rb:241:in `block (5 levels) in <module:Spree>'
```
2020-11-27 13:59:46 +00:00
Matt-Yorkley
93fe8dbc5f
Replace #scoped, which is now deprecated and removed in Rails 4.1
2020-11-27 13:59:46 +00:00
Matt-Yorkley
5c5a6361bf
Fix nasty json encoding issue
...
The enterprise id returned by these json endpoints was being returned in *unicode* format, so where Angular was expecting a simple integer it was instead getting strings like: "\u0017"
2020-11-27 13:59:46 +00:00
Matt-Yorkley
0f2cbe8a52
Fix API exception response handling
...
For some reason when using `render text:` instead of `render json:` for this response, the status code being returned was 200 instead of the clearly explicitly defined 422 (:unprocessable_entity). I absolutely have no idea why!
2020-11-27 13:59:46 +00:00
Matt-Yorkley
f1002b953d
Disable Javascript CSRF protection on EnterprisesController#check_permalink route
...
This route checks if an enterprise permalink is taken or not. Allowing the route to be accessed via Javascript without strict CSRF protection is reasonable. Fixes the following errors:
ActionController::InvalidCrossOriginRequest: Security warning: an embedded <script> tag on another site requested protected JavaScript. If you know what you're doing, go ahead and disable forgery protection on this action to permit cross-origin JavaScript embedding.
2020-11-27 13:59:46 +00:00
Luis Ramos
3ebc8145df
Avoid calling update with nil values
2020-11-27 13:59:46 +00:00
Luis Ramos
edc1773676
Fix some calls to sum in reports code
2020-11-27 13:59:46 +00:00
Luis Ramos
6814eb663f
Fix respond_with error
2020-11-27 13:59:46 +00:00
Luis Ramos
78cfcd905f
Adapt more & and no & when using sum
2020-11-27 13:59:46 +00:00
Luis Ramos
9bbef16804
Converting all calls to ActiveRelation#sum to use a symbol with &
...
This is only applicable to database columns, if we are summing using a method in the model than the & is required!
2020-11-27 13:59:46 +00:00
Luis Ramos
974240fd4b
Fix two sum calls in checkout helper
2020-11-27 13:59:46 +00:00
Luis Ramos
7472b7cc27
Fix sum call in quantifier
2020-11-27 13:59:46 +00:00
Eduardo
a8a933d73a
change from render json to render plain due to template missing issue
2020-11-27 13:59:46 +00:00
Luis Ramos
bcd07e1791
Upgrade to rails 4.1
2020-11-27 13:59:46 +00:00
Luis Ramos
ecb29ec830
Add state machine patch to fix error with state machine
...
See here for details: https://github.com/pluginaweek/state_machine/issues/251#issuecomment-32133267
2020-11-27 13:59:46 +00:00
Luis Ramos
202aa3e5b7
Use reflections instead of, now gone, reflections
2020-11-27 13:59:46 +00:00
Luis Ramos
a05f43000a
ActionView was extracted from ActionPack in rails 4.1 so we need to use ActionView
2020-11-27 13:59:46 +00:00
Luis Ramos
61708e5deb
AbstractController::ViewPaths was moved to ActionView::ViewPaths in rails 4.1
2020-11-27 13:59:46 +00:00
Matt-Yorkley
27586d072d
Merge pull request #6423 from openfoodfoundation/revert-6277-controllers
...
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:29:15 +01:00
Matt-Yorkley
3bfa903912
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:11:57 +01:00
Pau Pérez Fabregat
17957ed6c0
Merge pull request #6408 from openfoodfoundation/transifex
...
Transifex
2020-11-27 10:31:56 +01:00
Pau Pérez Fabregat
8b6a08457a
Merge pull request #6293 from luisramos0/subs_debug
...
Add task to print Subscriptions debug info
2020-11-27 10:17:57 +01:00
Maikel
9e2a3d6973
Merge pull request #6277 from luisramos0/controllers
...
Move Spree::Admin::BaseController to Admin::BaseController
2020-11-27 16:13:55 +11:00
Icker
55b21310e4
Added introductory information for testing.
2020-11-25 09:44:02 -08:00
Transifex-Openfoodnetwork
1266a37ac5
Updating translations for config/locales/en_NZ.yml
2020-11-25 05:39:17 +11:00
Transifex-Openfoodnetwork
54feb2f57d
Updating translations for config/locales/en_AU.yml
2020-11-24 07:31:32 +11:00
Transifex-Openfoodnetwork
e9eb90507e
Updating translations for config/locales/ca.yml
2020-11-24 07:22:28 +11:00
Transifex-Openfoodnetwork
ee44159c83
Updating translations for config/locales/es.yml
2020-11-24 07:19:47 +11:00
Transifex-Openfoodnetwork
8861f5c6aa
Updating translations for config/locales/ca.yml
2020-11-24 07:19:18 +11:00
Matt-Yorkley
b089404891
Merge pull request #6362 from coopdevs/remove-unused-truncate-html-gem
...
Remove unused truncate_html gem
2020-11-23 00:49:34 +01:00
Andy Brett
8f25568530
Merge pull request #6390 from jhsu802701/qtest
...
SIMPLE: added scripts for running test suite in quiet mode
2020-11-20 12:15:04 -08:00
Andy Brett
b1b422b90e
fix/silence rubocop styles
2020-11-20 10:41:31 -08:00
Andy Brett
85d99f3bf2
Merge branch 'master' into controllers
2020-11-20 08:12:03 -08:00
Andy Brett
c6b3a615f1
Merge pull request #6385 from jhsu802701/update_db_schema
...
SIMPLE: updated db/schema.rb with 'bundle exec rake db:migrate'
2020-11-20 08:03:27 -08:00
Matt-Yorkley
5429bd8d7a
Update all locales with the latest Transifex translations
2020-11-19 23:13:09 +00:00
Matt-Yorkley
300e87648b
Merge pull request #6394 from openfoodfoundation/transifex
...
Transifex
2020-11-20 00:11:03 +01:00
Matt-Yorkley
4a9ac62d91
Merge branch 'master' into transifex
2020-11-20 00:10:48 +01:00
Luis Ramos
d7a1d7769c
Merge pull request #6258 from luisramos0/s3_with_region
...
Upgrade aws-sdk and switch to S3 virtual host style URLs
2020-11-19 22:59:57 +00:00
Transifex-Openfoodnetwork
cd20d2612d
Updating translations for config/locales/cy.yml
2020-11-19 22:09:04 +11:00
Transifex-Openfoodnetwork
446007e283
Updating translations for config/locales/cy.yml
2020-11-19 22:05:56 +11:00
Transifex-Openfoodnetwork
7bc59512fd
Updating translations for config/locales/cy.yml
2020-11-19 22:02:49 +11:00
Pau Pérez Fabregat
8c9960854f
Merge pull request #6343 from Matt-Yorkley/api-controllers
...
API controllers: strong paramaters
2020-11-19 09:04:16 +01:00
Jason Hsu
59b3bfa161
Added scripts for running test suite in quiet mode and updated docker/README.md
2020-11-18 16:25:03 -06:00
Transifex-Openfoodnetwork
9fc3ff0250
Updating translations for config/locales/en_GB.yml
2020-11-19 05:14:36 +11:00
Transifex-Openfoodnetwork
7ddbc10c19
Updating translations for config/locales/en_GB.yml
2020-11-19 05:11:27 +11:00
Matt-Yorkley
b0a70f0ba3
Improve TaxonController strong params handling
2020-11-17 19:48:27 +00:00
Matt-Yorkley
0b18b0dc0a
Include Calculator attributes in PaymentMethod nested attributes and DRY repeated code
2020-11-17 19:04:26 +00:00
Matt-Yorkley
d225294b6b
Extract to PermittedAttributes::Calculator
2020-11-17 18:51:48 +00:00