aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/form_helper.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 18:48:35 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 18:48:35 +0200
commit66a7cfa91045e05f134efc9ac0e226e66161e2e6 (patch)
tree39b8554cfe4e27a30be3eed905bc2afcc26cfe89 /actionview/lib/action_view/helpers/form_helper.rb
parentbde6547bb6a8ddf18fb687bf20893d3dc87e0358 (diff)
downloadrails-66a7cfa91045e05f134efc9ac0e226e66161e2e6.tar.gz
rails-66a7cfa91045e05f134efc9ac0e226e66161e2e6.tar.bz2
rails-66a7cfa91045e05f134efc9ac0e226e66161e2e6.zip
applies new string literal convention in actionview/lib
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'actionview/lib/action_view/helpers/form_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/form_helper.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb
index 3d2ae0cfe0..3f7b6c0f9c 100644
--- a/actionview/lib/action_view/helpers/form_helper.rb
+++ b/actionview/lib/action_view/helpers/form_helper.rb
@@ -1,14 +1,14 @@
-require 'cgi'
-require 'action_view/helpers/date_helper'
-require 'action_view/helpers/tag_helper'
-require 'action_view/helpers/form_tag_helper'
-require 'action_view/helpers/active_model_helper'
-require 'action_view/model_naming'
-require 'action_view/record_identifier'
-require 'active_support/core_ext/module/attribute_accessors'
-require 'active_support/core_ext/hash/slice'
-require 'active_support/core_ext/string/output_safety'
-require 'active_support/core_ext/string/inflections'
+require "cgi"
+require "action_view/helpers/date_helper"
+require "action_view/helpers/tag_helper"
+require "action_view/helpers/form_tag_helper"
+require "action_view/helpers/active_model_helper"
+require "action_view/model_naming"
+require "action_view/record_identifier"
+require "active_support/core_ext/module/attribute_accessors"
+require "active_support/core_ext/hash/slice"
+require "active_support/core_ext/string/output_safety"
+require "active_support/core_ext/string/inflections"
module ActionView
# = Action View Form Helpers
@@ -1270,7 +1270,7 @@ module ActionView
end
def self._to_partial_path
- @_to_partial_path ||= name.demodulize.underscore.sub!(/_builder$/, '')
+ @_to_partial_path ||= name.demodulize.underscore.sub!(/_builder$/, "")
end
def to_partial_path
@@ -1574,7 +1574,7 @@ module ActionView
record_name = if index
"#{object_name}[#{index}][#{record_name}]"
- elsif record_name.to_s.end_with?('[]')
+ elsif record_name.to_s.end_with?("[]")
record_name = record_name.to_s.sub(/(.*)\[\]$/, "[\\1][#{record_object.id}]")
"#{object_name}#{record_name}"
else