gregbell/active_admin — Issue #1016: table_for with no items displays ugly extra []
Author: djwonk
Created: 2012-02-14 19:09:51+00:00
State: open

panel "Notes" do
table_for(c.case_notes) do |t|
t.column("Note ID", :id) do |case_note|
link_to(case_note.pretty_id, admin_case_note_path(case_note))
end
t.column("Contact ID") do |case_note|
contact = case_note.contact
if contact
link_to(contact.pretty_id, admin_contact_path(contact))
else
"n/a"
end
end
# ...