Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Make last names optional on Spree::Address #4

Merged

Conversation

jordan-brough
Copy link

(See Solidus PR 1369)

Amazon Payments doesn't require two names, which breaks this
validation. It's hard to remove an ActiveRecord validation at the
app level.

For example, we're integrating with Amazon Payments right now and
Amazon doesn't require two names, which breaks this validation. And
it's hard to remove an ActiveRecord validation at the app level.
@@ -5,7 +5,7 @@ class Address < Spree::Base
belongs_to :country, class_name: "Spree::Country"
belongs_to :state, class_name: "Spree::State"

validates :firstname, :lastname, :address1, :city, :country_id, presence: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not going to potentially be a breaking change for some people? Did you find why this was required in the first place or is it one of those "historic" things?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered in the PR on Solidus: solidusio#1369

@chrisradford
Copy link

👍

@jordan-brough jordan-brough merged commit d672eba into Lostmyname:v1.3-lmn Aug 4, 2016
@jordan-brough jordan-brough deleted the lmn-make-last-name-optional branch August 4, 2016 11:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants