Skip to content

Commit

Permalink
Remove translation from Spree::LineItem
Browse files Browse the repository at this point in the history
Due to [I assume] the Rails load order, it this translation prohibits include/prepend/extend decoration of Spree::LineItem as the locales aren鈥檛 loaded yet. I also believe this to be redundant, as there is a before_validation method to ensure the quantity is never less than 0 on #L15
  • Loading branch information
SebAshton committed Feb 18, 2016
1 parent cd9b7b4 commit e71b647
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/app/models/spree/line_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class LineItem < Spree::Base
validates :variant, presence: true
validates :quantity, numericality: {
only_integer: true,
greater_than: -1,
message: Spree.t('validation.must_be_int')
greater_than: -1
}
validates :price, numericality: true
validate :ensure_proper_currency
Expand Down

0 comments on commit e71b647

Please sign in to comment.