mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add business address permitted attributes
This commit is contained in:
committed by
Nihal M. Kelanthodika
parent
b53047e0e3
commit
783b055d55
14
app/services/permitted_attributes/business_address.rb
Normal file
14
app/services/permitted_attributes/business_address.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module PermittedAttributes
|
||||
class BusinessAddress
|
||||
def self.attributes
|
||||
[
|
||||
:business_name, :address1, :address2,
|
||||
:city, :country_id, :state_id, :zipcode,
|
||||
:phone
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,6 +17,7 @@ module PermittedAttributes
|
||||
group_ids: [], user_ids: [],
|
||||
shipping_method_ids: [], payment_method_ids: [],
|
||||
address_attributes: PermittedAttributes::Address.attributes,
|
||||
business_address_attributes: PermittedAttributes::BusinessAddress.attributes,
|
||||
producer_properties_attributes: [:id, :property_name, :value, :_destroy]
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user