gregbell/active_admin — pull request #1460 by jpmckinney (2012-07-03 04:11:21+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` (`span I18n.t('active_admin.empty'), :class => "empty"`) will be rendered after "some_content". You can get around this by doing:

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

because "sigh..." won't be rendered, but that seems a little silly. 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.