lib/active_admin/views/components/attributes_table.rb in activeadmin-4.0.0.beta10 vs lib/active_admin/views/components/attributes_table.rb in activeadmin-4.0.0.beta11
- old
+ new
@@ -21,19 +21,20 @@
attrs.each { |attr| row(attr) }
end
def row(*args, &block)
title = args[0]
+ data = args[1] || args[0]
options = args.extract_options!
options["data-row"] = title.to_s.parameterize(separator: "_") if title.present?
@table << tr(options) do
th do
header_content_for(title)
end
@collection.each do |record|
td do
- content_for(record, block || title)
+ content_for(record, block || data)
end
end
end
end