Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not extend Object.

  • Loading branch information...
commit d4dd055be2a4d618468bbd99a7c1ad82862924ab 1 parent 7b054e9
@ebeigarts ebeigarts authored
View
1  lib/active_admin/arbre.rb
@@ -1,5 +1,4 @@
require "active_admin/arbre/builder"
-require "active_admin/arbre/core_extensions"
require "active_admin/arbre/context"
require "active_admin/arbre/html/element"
require "active_admin/arbre/html/attributes"
View
5 lib/active_admin/arbre/core_extensions.rb
@@ -1,5 +0,0 @@
-class Object
- def to_html
- to_s
- end
-end
View
2  lib/active_admin/arbre/html/text_node.rb
@@ -27,7 +27,7 @@ def tag_name
end
def to_html
- ERB::Util.html_escape(@content.to_html)
+ ERB::Util.html_escape(@content.to_s)
end
end
View
2  spec/unit/arbre/html/element_spec.rb
@@ -96,7 +96,7 @@
it "should html escape the string" do
string = "Goodbye <br />"
element.content = string
- element.content.to_html.should == "Goodbye &lt;br /&gt;"
+ element.to_html.should == "Goodbye &lt;br /&gt;"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.