Mohamed ABDELLANI
0fbf88190e
Generate invoice model
...
There are three main components:
1. The invoice model
2. order serializers: serialize the order for the invoice
3. data presenters: the object that will be use to access the order's serialize data
2023-06-18 21:03:13 +02:00
Matt-Yorkley
1d5077061e
Remove andand
...
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
2021-09-08 14:28:31 +01:00
Andy Brett
334b9b520a
removed deprecated calls to force_ssl; rely on config.force_ssl
2021-06-24 11:58:33 -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
b265fbf9a0
Remove initial slash from admin layout, this fixes a problem with layouts cant be loaded from absolute paths
2021-05-11 22:34:15 +01:00
Matt-Yorkley
26688dda36
Add angular_form helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `ng_options_for_select' for #<#<Class:0x00007fbf8e43e310>:0x000055783fbebec0>
Did you mean? options_for_select
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/helpers/angular_form_builder.rb:26:in `ng_select'
# ./app/views/admin/enterprise_fees/index.html.haml:34:in `block (2 levels) in _app_views_admin_enterprise_fees_index_html_haml__800455454875182851_46987476952700'
# ./app/helpers/angular_form_builder.rb:6:in `ng_fields_for'
# ./app/views/admin/enterprise_fees/index.html.haml:28:in `block in _app_views_admin_enterprise_fees_index_html_haml__800455454875182851_46987476952700'
# ./app/helpers/application_helper.rb:11:in `ng_form_for'
# ./app/views/admin/enterprise_fees/index.html.haml:4:in `_app_views_admin_enterprise_fees_index_html_haml__800455454875182851_46987476952700'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `ng_options_for_select' for #<#<Class:0x00007fbf8e43e310>:0x000055783fbebec0>
# Did you mean? options_for_select
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
b7aeceaf67
Add enterprise_fees helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `angular_id' for #<#<Class:0x00007f57c7126670>:0x00007f57c55754f8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/views/admin/enterprise_fees/index.html.haml:32:in `block (2 levels) in _app_views_admin_enterprise_fees_index_html_haml__3854507252304647884_70007474860840'
# ./app/helpers/angular_form_builder.rb:6:in `ng_fields_for'
# ./app/views/admin/enterprise_fees/index.html.haml:28:in `block in _app_views_admin_enterprise_fees_index_html_haml__3854507252304647884_70007474860840'
# ./app/helpers/application_helper.rb:11:in `ng_form_for'
# ./app/views/admin/enterprise_fees/index.html.haml:4:in `_app_views_admin_enterprise_fees_index_html_haml__3854507252304647884_70007474860840'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `angular_id' for #<#<Class:0x00007f57c7126670>:0x00007f57c55754f8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
e6a3041f45
Add admin/enterprises helper
...
Fixes:
Failure/Error: super
ActionView::Template::Error:
undefined method `add_check_if_single' for #<#<Class:0x0000564501a3c838>:0x00007f446cdd68e8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
# ./app/views/spree/admin/shared/_hubs_sidebar.html.haml:16:in `block in _app_views_spree_admin_shared__hubs_sidebar_html_haml___1973426344114200431_69965928779540'
# ./app/views/spree/admin/shared/_hubs_sidebar.html.haml:11:in `each'
# ./app/views/spree/admin/shared/_hubs_sidebar.html.haml:11:in `_app_views_spree_admin_shared__hubs_sidebar_html_haml___1973426344114200431_69965928779540'
# ./app/views/spree/admin/payment_methods/edit.html.haml:15:in `block in _app_views_spree_admin_payment_methods_edit_html_haml__571217921761730685_69965930474120'
# ./app/views/spree/admin/payment_methods/edit.html.haml:11:in `_app_views_spree_admin_payment_methods_edit_html_haml__571217921761730685_69965930474120'
# ./app/controllers/admin/resource_controller.rb:23:in `block (2 levels) in edit'
# ./lib/spree/core/controller_helpers/respond_with.rb:24:in `respond_with'
# ./app/controllers/admin/resource_controller.rb:22:in `edit'
# ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `add_check_if_single' for #<#<Class:0x0000564501a3c838>:0x00007f446cdd68e8>
# ./app/helpers/application_helper.rb:20:in `method_missing'
2021-05-03 14:17:54 +01:00
Matt-Yorkley
943c00c924
WIP - Update loading of helpers in controllers
...
Rails has changed the way helpers are loaded. It's a bit weird. It was throwing lots of errors, and recommended using this setting, but now requires that all helpers are loaded explicitly. I'm not sure about this.
2021-05-03 14:17:54 +01: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
Luis Ramos
4060e7debf
Replace usages of Spree::BaseController with ApplicationController
2021-01-15 21:59:16 +00:00
Matt-Yorkley
3bfa903912
Revert "Move Spree::Admin::BaseController to Admin::BaseController"
2020-11-27 14:11:57 +01:00
Luis Ramos
66ba9ff73d
Move Spree::Admin::BaseController to Admin::BaseController
2020-10-31 09:51:37 +00:00
Luis Ramos
1666ffb191
Remove try_spree_current_user
...
This can be done because the method is defined in OFN's ApplicationController, so spree_current_user is available in all controllers
2020-07-15 14:53:35 +01:00
Luis Ramos
8a61257547
Rename all before_filter to before_action, it's the same function with a new name
2020-06-22 13:11:57 +01:00
Pau Pérez Fabregat
a396a7f0af
Merge pull request #4818 from luisramos0/delete_dead_code
...
Delete dead code after PRs 4512 and 4508
2020-02-25 13:32:23 +01:00
Luis Ramos
1bdeda4a21
Delete dead code after PRs 4512 and 4508
2020-02-21 12:25:07 +00:00
luisramos0
2acf8e5125
Remove config_locale from base controller, in OFN we dont have separate locales for frontoffice and backoffice
2020-02-05 16:02:43 +00:00
Luis Ramos
ea75714561
Merge pull request #4635 from luisramos0/main_app_routes
...
Replace use of spree.root_path and root_url with main_app.root_path and main_app.root_url
2020-02-04 16:02:48 +00:00
Matt-Yorkley
5f3abbf00e
Refactor BaseController
2020-01-22 12:17:23 +01:00
Matt-Yorkley
59ebfb9bd4
Fix subquery errors triggered by #warn_invalid_order_cycles
2020-01-22 12:17:23 +01:00
Matt-Yorkley
57ca1d54bb
Fix issue with each_serializer not being called in some cases in Rails 4.
2020-01-22 12:17:23 +01:00
luisramos0
a8a6fce385
Prefix root_path with main_app so that ofn's route is used. The spree root path will no longer be defined when spree_backend is dropped
2019-12-28 18:45:57 +00:00
luisramos0
f587bbb7d5
Remove unnecessary helper
2019-12-15 21:03:53 +00:00
luisramos0
2793693a7c
Improve if clause readability
2019-12-15 21:03:53 +00:00
luisramos0
07e2317369
Replace deprecated URI.unescape with CGI.unescape
2019-12-15 21:03:53 +00:00
luisramos0
042162eda8
Delete unused method
2019-12-15 21:03:53 +00:00
luisramos0
795f13d73a
Remove spree alerts feature that would check spree website for security alerts
...
This is not something we need running such an old version of spree
2019-12-15 21:03:53 +00:00
luisramos0
f1814f1b67
Fix most rubocop issues in spree/admin/base_controller
2019-12-15 21:03:53 +00:00
luisramos0
4ab7b78cb8
Merge base_controller with its decorator
2019-12-15 21:03:53 +00:00
luisramos0
11631c3a33
Add base_controller from spree_backend so that we can now merge it with the OFN's decorator
2019-12-15 21:03:53 +00:00