aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tag_helper.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-02-02 13:30:08 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-02-02 13:30:08 +1100
commit535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81 (patch)
treedcbd2acf8e83493eea719bf0a0c51a9c121bf194 /actionpack/lib/action_view/helpers/tag_helper.rb
parent49a26c533366eff63acd3c99ed0dffc04f85f55c (diff)
parent9b5dae7af5757769c1e69d74a59ff036adc1f30f (diff)
downloadrails-535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81.tar.gz
rails-535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81.tar.bz2
rails-535ae3b946b387af7eb6cb4bb4aed3d5cac1cf81.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_view/helpers/tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index ceddbd8cc1..ed80e07c78 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -1,4 +1,3 @@
-require 'action_view/erb/util'
require 'set'
module ActionView
@@ -41,7 +40,7 @@ module ActionView
# tag("img", { :src => "open &amp; shut.png" }, false, false)
# # => <img src="open &amp; shut.png" />
def tag(name, options = nil, open = false, escape = true)
- "<#{name}#{tag_options(options, escape) if options}#{open ? ">" : " />"}".html_safe!
+ "<#{name}#{tag_options(options, escape) if options}#{open ? ">" : " />"}".html_safe
end
# Returns an HTML block tag of type +name+ surrounding the +content+. Add
@@ -94,7 +93,7 @@ module ActionView
# cdata_section(File.read("hello_world.txt"))
# # => <![CDATA[<hello from a text file]]>
def cdata_section(content)
- "<![CDATA[#{content}]]>".html_safe!
+ "<![CDATA[#{content}]]>".html_safe
end
# Returns an escaped version of +html+ without affecting existing escaped entities.
@@ -128,7 +127,7 @@ module ActionView
def content_tag_string(name, content, options, escape = true)
tag_options = tag_options(options, escape) if options
- "<#{name}#{tag_options}>#{content}</#{name}>".html_safe!
+ "<#{name}#{tag_options}>#{content}</#{name}>".html_safe
end
def tag_options(options, escape = true)
@@ -143,7 +142,7 @@ module ActionView
attrs << %(#{key}="#{final_value}")
end
end
- " #{attrs.sort * ' '}".html_safe! unless attrs.empty?
+ " #{attrs.sort * ' '}".html_safe unless attrs.empty?
end
end
end