Add 'oz' as a weight unit for harvesting

This commit is contained in:
Mackenzie Morgan
2014-07-30 01:31:39 -04:00
parent 6e48b7d224
commit 1716de2dfc

View File

@@ -38,7 +38,8 @@ class Harvest < ActiveRecord::Base
WEIGHT_UNITS_VALUES = {
"kg" => "kg",
"lb" => "lb"
"lb" => "lb",
"oz" => "oz"
}
validates :weight_unit, :inclusion => { :in => WEIGHT_UNITS_VALUES.values,
:message => "%{value} is not a valid unit" },