lib/active_admin/views/components/attributes_table.rb in activeadmin-0.5.1 vs lib/active_admin/views/components/attributes_table.rb in activeadmin-0.6.0

- old
+ new

@@ -15,16 +15,19 @@ def rows(*attrs) attrs.each {|attr| row(attr) } end - def row(attr, &block) - @table << tr do + def row(*args, &block) + title = args[0] + options = args.extract_options! + options[:class] ||= :row + @table << tr(options) do th do - header_content_for(attr) + header_content_for(title) end td do - content_for(block || attr) + content_for(block || title) end end end protected