Skip to content

Commit

Permalink
Move Error Text calculation inside error block
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekOnCoffee authored and radar committed Jul 29, 2013
1 parent ced6146 commit a9e6545
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/app/models/spree/order_populator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def check_stock_levels(variant, quantity)
else
display_name = %Q{#{variant.name}}
display_name += %Q{ (#{variant.options_text})} unless variant.options_text.blank?

errors.add(:base, Spree.t(:out_of_stock, :scope => :order_populator, :item => display_name.inspect))
return false
end
Expand Down

0 comments on commit a9e6545

Please sign in to comment.