mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
move all_units to admin helper
This commit is contained in:
@@ -8,6 +8,10 @@ module Spree
|
||||
end
|
||||
options_from_collection_for_select(currencies, :first, :last, Spree::Config[:currency])
|
||||
end
|
||||
|
||||
def all_units
|
||||
["g", "oz", "lb", "kg", "T", "mL", "L", "kL"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
%fieldset.available_units.no-border-bottom
|
||||
%legend{:align => "center"}= t('admin.available_units')
|
||||
.field
|
||||
- all_units = ["g", "oz", "lb", "kg", "T", "mL", "L", "kL"]
|
||||
- selected_units = Spree::Config[:available_units].split(",")
|
||||
- all_units.each do |unit|
|
||||
- selected = selected_units.include?(unit)
|
||||
|
||||
Reference in New Issue
Block a user