Skip to content

Commit

Permalink
Remove obsolete references to Address deprecated fields
Browse files Browse the repository at this point in the history
  • Loading branch information
filippoliverani committed Oct 30, 2020
1 parent 01a32f4 commit 3114e07
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 40 deletions.
9 changes: 1 addition & 8 deletions api/app/helpers/spree/api/api_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,12 @@ def required_fields_for(model)
:id, :number, :state, :order_id, :memo, :created_at, :updated_at
]

@@address_base_attributes = [
@@address_attributes = [
:id, :name, :address1, :address2, :city, :zipcode, :phone, :company,
:alternative_phone, :country_id, :country_iso, :state_id, :state_name,
:state_text
]

@@address_attributes = if Spree::Config.use_combined_first_and_last_name_in_address
@@address_base_attributes
else
@@address_base_attributes +
Spree::Address::LEGACY_NAME_ATTRS.map(&:to_sym)
end

@@country_attributes = [:id, :iso_name, :iso, :iso3, :name, :numcode]

@@state_attributes = [:id, :name, :abbr, :country_id]
Expand Down
20 changes: 0 additions & 20 deletions api/openapi/solidus-api.oas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5675,20 +5675,8 @@ components:
type: integer
country_iso:
type: string
firstname:
type: string
deprecated: true
description: '*Deprecated: will be removed in Solidus 3.0, please use `name` property*'
full_name:
type: string
deprecated: true
description: '*Deprecated: will be removed in Solidus 3.0, please use `name` property*'
id:
type: integer
lastname:
type: string
deprecated: true
description: '*Deprecated: will be removed in Solidus 3.0, please use `name` property*'
name:
type: string
phone:
Expand Down Expand Up @@ -6225,14 +6213,6 @@ components:
type: integer
name:
type: string
firstname:
type: string
deprecated: true
description: '*Deprecated: will be removed in Solidus 3.0, please use `name` property*'
lastname:
type: string
deprecated: true
description: '*Deprecated: will be removed in Solidus 3.0, please use `name` property*'
address1:
type: string
address2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
margin-bottom: 15px;
}

label[for="order_bill_address_attributes_firstname"] {
margin-top: 53.5px;
}

label[for="order_bill_address_attributes_name"] {
margin-top: 53.5px;
}
Expand Down
6 changes: 0 additions & 6 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ en:
address2: Street Address (cont'd)
city: City
company: Company
firstname: First Name
lastname: Last Name
name: Name
phone: Phone
zipcode: Zip Code
Expand Down Expand Up @@ -130,17 +128,13 @@ en:
spree/order/bill_address:
address1: Billing address street
city: Billing address city
firstname: Billing address first name
lastname: Billing address last name
name: Billing address name
phone: Billing address phone
state: Billing address state
zipcode: Billing address zipcode
spree/order/ship_address:
address1: Shipping address street
city: Shipping address city
firstname: Shipping address first name
lastname: Shipping address last name
name: Shipping address name
phone: Shipping address phone
state: Shipping address state
Expand Down
2 changes: 0 additions & 2 deletions guides/source/developers/users/addresses.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Spree::User.find(1).addresses
`Spree::Address` objects have the following attributes:

- `name`: The full name for the person at this address.
- `firstname`: *Deprecated: will be removed in Solidus 3.0, please use `name` attribute* - The first name for the person at this address.
- `lastname`: *Deprecated: will be removed in Solidus 3.0, please use `name` attribute* - The last name for the person at this address.
- `address1` and `address2`: The street address (with an optional second line).
- `city`: The city where the address is.
- `zipcode`: The postal code.
Expand Down

0 comments on commit 3114e07

Please sign in to comment.