aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authorVladimir Krylov <vladimir.krylov@perfectline.co>2014-02-24 17:06:57 +0200
committerVladimir Krylov <vladimir.krylov@perfectline.co>2014-02-24 17:06:57 +0200
commit2cbc8c40b4c4c900bca7039998f92c7e5142e6d1 (patch)
tree5ac3dd98a03411bdfa0d7f881ead8b8e651d42a1 /actionview/lib/action_view/helpers
parentd61baee52adcd1baebe15f1065a0805857571f19 (diff)
downloadrails-2cbc8c40b4c4c900bca7039998f92c7e5142e6d1.tar.gz
rails-2cbc8c40b4c4c900bca7039998f92c7e5142e6d1.tar.bz2
rails-2cbc8c40b4c4c900bca7039998f92c7e5142e6d1.zip
Fix ActionView label translation for more than 10 nested elements
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/tags/label.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb
index 35d3ba8434..6335e3dd4d 100644
--- a/actionview/lib/action_view/helpers/tags/label.rb
+++ b/actionview/lib/action_view/helpers/tags/label.rb
@@ -36,7 +36,7 @@ module ActionView
content = @template_object.capture(&block)
else
content = if @content.blank?
- @object_name.gsub!(/\[(.*)_attributes\]\[\d\]/, '.\1')
+ @object_name.gsub!(/\[(.*)_attributes\]\[\d+\]/, '.\1')
method_and_value = tag_value.present? ? "#{@method_name}.#{tag_value}" : @method_name
if object.respond_to?(:to_model)