Allow to specify an order schedule for new orders.

This commit is contained in:
wvengen 2014-11-22 00:33:16 +01:00
parent 6e990fed4c
commit 219eb71bc9
16 changed files with 204 additions and 8 deletions

View file

@ -48,9 +48,18 @@ describe 'admin/configs', type: :feature do
def get_full_config
cfg = FoodsoftConfig.to_hash.deep_dup
cfg.each {|k,v| v.reject! {|k,v| v.blank?} if v.is_a? Hash}
cfg.reject! {|k,v| v.blank?}
cfg
compact_hash_deep!(cfg)
end
def compact_hash_deep!(h)
h.each do |k,v|
if v.is_a? Hash
compact_hash_deep!(v)
v.reject! {|k,v| v.blank?}
end
end
h.reject! {|k,v| v.blank?}
h
end
end