aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-30 10:20:17 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-30 10:20:17 -0800
commit19e56400f7075fee3cfe1cdaf196eb32b5532381 (patch)
tree083ed8c399ec6791f907698fa0aa5c3398505834 /actionpack/lib
parentaa202965603fb8511bdd2448677d19dfb7afa87f (diff)
parent540ebe37cd1a9551b739c552a0d4efd2adc7ff22 (diff)
downloadrails-19e56400f7075fee3cfe1cdaf196eb32b5532381.tar.gz
rails-19e56400f7075fee3cfe1cdaf196eb32b5532381.tar.bz2
rails-19e56400f7075fee3cfe1cdaf196eb32b5532381.zip
Merge pull request #9124 from semaperepelitsa/content_tag_for_class2
Fix content_tag_for with array :class option
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/record_tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/record_tag_helper.rb b/actionpack/lib/action_view/helpers/record_tag_helper.rb
index 271a194913..f767957fa9 100644
--- a/actionpack/lib/action_view/helpers/record_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/record_tag_helper.rb
@@ -92,7 +92,7 @@ module ActionView
# for each record.
def content_tag_for_single_record(tag_name, record, prefix, options, &block)
options = options ? options.dup : {}
- options[:class] = "#{dom_class(record, prefix)} #{options[:class]}".rstrip
+ options[:class] = [ dom_class(record, prefix), options[:class] ].compact
options[:id] = dom_id(record, prefix)
if block_given?