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

Commit

Permalink
Merge pull request #4 from jordan-brough/lmn-make-last-name-optional
Browse files Browse the repository at this point in the history
Make last names optional on Spree::Address
  • Loading branch information
jordan-brough authored Aug 4, 2016
2 parents 1d6ae6e + 72533cc commit d672eba
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 @@ -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
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 d672eba

Please sign in to comment.