From a0c0d394872f26f5ced3f9baa823a4d032b5ca2b Mon Sep 17 00:00:00 2001 From: f Date: Tue, 24 Jul 2018 18:34:06 -0300 Subject: [PATCH] si es anidado tambien queremos mostrarlo en su propia columna --- app/views/posts/template_field/_table.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/posts/template_field/_table.haml b/app/views/posts/template_field/_table.haml index 4e128cb..e6624b3 100644 --- a/app/views/posts/template_field/_table.haml +++ b/app/views/posts/template_field/_table.haml @@ -32,7 +32,7 @@ - col.each do |nf| - last = template.nested_fields.last == nf - odd = (template.nested_fields.count % cols) != 0 - %div{class: (last && odd) ? 'col-md-12' : "col-md-#{12/cols}"} + %div{class: (nf.nested? || (last && odd)) ? 'col-md-12' : "col-md-#{12/cols}"} -# Si el template es un array, quiere decir que esperamos un array de hashes. -# XXX usamos local_name para hacerlo recursivo y sumar el -# name después, sin modificarlo recursivamente.