aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authorSourav Moitra <sourav.moitr@gmail.com>2016-02-13 03:36:59 +0530
committerSourav Moitra <sourav.moitr@gmail.com>2016-02-14 16:45:50 +0530
commitaeee438bf120f44a4402250fa50ef530f3c830a8 (patch)
tree97c06fa7f488acf60959b6e6321526f25db5af55 /actionview/lib/action_view/helpers
parent73fb2977cab8cd9b8ed7bb61df3072e2ca74b3ce (diff)
downloadrails-aeee438bf120f44a4402250fa50ef530f3c830a8.tar.gz
rails-aeee438bf120f44a4402250fa50ef530f3c830a8.tar.bz2
rails-aeee438bf120f44a4402250fa50ef530f3c830a8.zip
Test to check if the data-attr if nil is same or not
if data attribute is nil it is ignored if value is nil the pair is ignored if value is nil it is skipped Improved test for data attr nil
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/tag_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index 2562504896..42e7358a1d 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -154,6 +154,7 @@ module ActionView
options.each_pair do |key, value|
if TAG_PREFIXES.include?(key) && value.is_a?(Hash)
value.each_pair do |k, v|
+ next if v.nil?
output << sep
output << prefix_tag_option(key, k, v, escape)
end