Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
table_for with no items displays "" #1016
In a show page for one object, where a table_for is used to display associated items, it displays "" instead of just making an empty table.
Source code example, in my
The associated html is:
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
@djwonk I tried looking into this a bit and couldn't figure it out on first walkthrough. The code in question can be found here https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/components/table_for.rb
You also might want to look in the arbre directory as that's where the HTML is mainly generated (https://github.com/gregbell/active_admin/tree/master/lib/active_admin/arbre)
My suspicion is that it has to do with default return values from some of the functions as otherwise why would a blank array show up? As an initial idea, perhaps the call to
I've had this problem on 0.3.4 and 0.4.0.