gregbell/active_admin — pull request #1479 by jpmckinney (2012-07-06 15:49:15+00:00)
Title: Only show empty_value for attributes_table row if the row is actually empty

If you do:

```ruby
ActiveAdmin.register ClassName do
show do
attributes_table do
row :attribute_name do |x|
div "some content"
if some_condition
div "other content"
end
end
end
end
end
```

and if `some_condition` evaluates to false, then [empty_value](https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/components/attributes_table.rb#L41) will be rendered after "some_content", even though the row is not empty! You can get around this by doing:

```ruby
row :attribute_name do |x|
div "some content"
if some_condition
div "other content"
end
"foobar"
end
```

because "foobar" won't be rendered, but that seems like a cludgy workaround. This pull request fixes this, so that an `attributes_table` `row` can return nil. The new code checks whether any content was created by the block passed to `row`, instead of checking the block's return value.

Specs included.