%table{:class => "#{table_styles}#{" #{table_with_header_styles}" if object.kind_of?(Array)}"} - if object.kind_of?(Array) %thead - overview_fields(type).each do |k, path| - if header_styles(k) %th{:class => header_styles(k)}= k.to_s.humanize - else %th= k.to_s.humanize - object.each do |o| %tr - overview_fields(type).each do |k, path| - parent = path.empty? ? type : path[-2] - path.shift - value, id = get_value_and_id(o, path) %td{:class => importantize(k, value)}= linkify(k, value, parent, id) - else - overview_fields(type).each do |k, path| - parent = path.empty? ? type : path[-2] - path.shift - value, id = get_value_and_id(object, path) %tr{ :class => importantize(k, value)} %td= k.to_s.humanize %td= linkify(k, value, parent, id)