diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-02-24 19:25:02 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-02-24 19:25:02 +0100 |
commit | f2577ca89f91204ee98850d89adec5263265cb7d (patch) | |
tree | 5ac3dd98a03411bdfa0d7f881ead8b8e651d42a1 /actionview/lib/action_view/helpers/tags/label.rb | |
parent | d61baee52adcd1baebe15f1065a0805857571f19 (diff) | |
parent | 2cbc8c40b4c4c900bca7039998f92c7e5142e6d1 (diff) | |
download | rails-f2577ca89f91204ee98850d89adec5263265cb7d.tar.gz rails-f2577ca89f91204ee98850d89adec5263265cb7d.tar.bz2 rails-f2577ca89f91204ee98850d89adec5263265cb7d.zip |
Merge pull request #14170 from kritik/master
there could be more than 10 nested records
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/label.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/label.rb | 2 |
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) |