Add business address permitted attributes

This commit is contained in:
Nihal Mohammed
2021-07-23 19:03:13 +05:30
committed by Nihal M. Kelanthodika
parent b53047e0e3
commit 783b055d55
2 changed files with 15 additions and 0 deletions

View 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

View File

@@ -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