Skip to content

Commit

Permalink
Merge pull request solidusio#1369 from jordan-brough/make-last-name-o…
Browse files Browse the repository at this point in the history
…ptional

Make last names optional on Spree::Address
  • Loading branch information
jhawthorn committed Sep 30, 2016
2 parents 2f2f1ef + 7fe6670 commit 284cf74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/app/models/spree/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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
validates :firstname, :address1, :city, :country_id, presence: true
validates :zipcode, presence: true, if: :require_zipcode?
validates :phone, presence: true, if: :require_phone?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
end

firstname 'John'
lastname 'Doe'
lastname nil
company 'Company'
address1 '10 Lovely Street'
address2 'Northwest'
Expand Down

0 comments on commit 284cf74

Please sign in to comment.