spree/spree — pull request #2205 by neotericdesign (2012-11-12 18:28:36+00:00)
Title: Not requiring a state should not mean the same as hiding the field

There was a PR (cannot for the life of me find it to reference now) where the :address_requires_state config option is used to completely hide the State field in the checkout/address form.

In our opinion, this is incorrect. The option is named "address_requires_state" not "show_state" or "hide_state". We want an Optional Field named State so that countries that have a state can fill it in, and those who do not, can ignore it.

This change makes it so the config option is used to toggle the visual distinctions in the UI on whether the field is required. This logic is already in place in the model for validation, so it makes sense that the UI should line up: it's an optional field now.

If people want to remove the field completely we think that should be a different config with a better name.