Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

checking empty as to not add rails as dependency

  • Loading branch information...
commit 2d7019766d7e2be553e1b9fd1464ac0433a0f77a 1 parent d5bd63a
@jancel jancel authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/active_admin/arbre/builder.rb
View
9 lib/active_admin/arbre/builder.rb
@@ -109,7 +109,14 @@ def append_return_block(tag)
end
def appendable_return_block?(tag)
- !tag.is_a?(Arbre::HTML::Element) && tag.respond_to?(:to_s) && !tag.blank?
+ appendable = !tag.is_a?(Arbre::HTML::Element) && tag.respond_to?(:to_s)
+
+ # Ruby 1.9 returns empty array as "[]"
+ if tag.respond_to?(:empty?) && tag.empty?
+ appendable = false
+ end
+
+ appendable
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.