mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Switch to using PermittedAttributes::Address instead of spree version of it that will be removed later
This commit is contained in:
@@ -84,8 +84,8 @@ module Admin
|
||||
def customer_params
|
||||
params.require(:customer).permit(
|
||||
:enterprise_id, :name, :email, :code, :tag_list,
|
||||
ship_address_attributes: permitted_address_attributes,
|
||||
bill_address_attributes: permitted_address_attributes,
|
||||
ship_address_attributes: PermittedAttributes::Address.attributes,
|
||||
bill_address_attributes: PermittedAttributes::Address.attributes,
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ module Admin
|
||||
params.require(:enterprise_group).permit(
|
||||
:name, :description, :long_description, :on_front_page, :owner_id, :permalink,
|
||||
:email, :website, :facebook, :instagram, :linkedin, :twitter,
|
||||
enterprise_ids: [], address_attributes: permitted_address_attributes
|
||||
enterprise_ids: [], address_attributes: PermittedAttributes::Address.attributes
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -319,7 +319,7 @@ module Admin
|
||||
:allow_guest_orders, :allow_order_changes, :enable_subscriptions,
|
||||
group_ids: [], user_ids: [],
|
||||
shipping_method_ids: [], payment_method_ids: [],
|
||||
address_attributes: permitted_address_attributes,
|
||||
address_attributes: PermittedAttributes::Address.attributes,
|
||||
producer_properties_attributes: [:id, :property_name, :value, :_destroy]
|
||||
)
|
||||
end
|
||||
|
||||
@@ -45,8 +45,8 @@ module Spree
|
||||
params.require(:order).permit(
|
||||
:email,
|
||||
:use_billing,
|
||||
:bill_address_attributes => permitted_address_attributes,
|
||||
:ship_address_attributes => permitted_address_attributes
|
||||
bill_address_attributes: PermittedAttributes::Address.attributes,
|
||||
ship_address_attributes: PermittedAttributes::Address.attributes
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module PermittedAttributes
|
||||
class Address
|
||||
def self.attributes
|
||||
|
||||
Reference in New Issue
Block a user