From 60d504247e56236be6239e9d93041d00e9fc1737 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 2 Jul 2018 13:18:21 -0300 Subject: [PATCH] no fallar miserablemente si value esta vacio --- app/models/post/template_field.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post/template_field.rb b/app/models/post/template_field.rb index a535c0c..b77ce49 100644 --- a/app/models/post/template_field.rb +++ b/app/models/post/template_field.rb @@ -288,7 +288,7 @@ class Post _value = [(_value.first + value).uniq] elsif _value.count == 2 _value = _value.each_with_index.map do |v,i| - v + value[i] + v + value.fetch(i, []) end end end