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.