Execute task and getting output from rake

This commit is contained in:
Adam
2015-12-31 14:17:38 +01:00
parent ca91c3d16f
commit a41e997931
6 changed files with 45 additions and 5 deletions

View File

@@ -124,12 +124,13 @@ class Item < ActiveRecord::Base
end
end
puts "Nonexistent codes: "
puts nonexistent_codes.join("\n")
puts "#{nonexistent_codes.join("\n")}"
end
def we_must_earn_money
if list_price.to_f <= current_input_price.to_f
errors[:list_price] << "#{code} Ulazna cijena veca od izlazne"
puts "#{code} Ulazna cijena veca od izlazne"
end
end