lib/active_admin/views/components/attributes_table.rb in activeadmin-2.7.0 vs lib/active_admin/views/components/attributes_table.rb in activeadmin-2.8.0
- old
+ new
@@ -3,11 +3,11 @@
class AttributesTable < ActiveAdmin::Component
builder_method :attributes_table_for
def build(obj, *attrs)
- @collection = Array.wrap(obj)
+ @collection = Array.wrap(obj)
@resource_class = @collection.first.class
options = {}
options[:for] = @collection.first if single_record?
super(options)
@table = table
@@ -18,10 +18,10 @@
def rows(*attrs)
attrs.each { |attr| row(attr) }
end
def row(*args, &block)
- title = args[0]
+ title = args[0]
options = args.extract_options!
classes = [:row]
if options[:class]
classes << options[:class]
elsif title.present?