From b6b0c99ff3e8ace3f42813154dbe4b8ad6a98e6c Mon Sep 17 00:00:00 2001 From: Genadi Samokovarov Date: Wed, 31 May 2017 12:16:20 +0300 Subject: Use mattr_accessor default: option throughout the project --- actionview/lib/action_view/base.rb | 15 +++++---------- actionview/lib/action_view/helpers/form_helper.rb | 6 ++---- actionview/lib/action_view/helpers/translation_helper.rb | 3 +-- actionview/lib/action_view/lookup_context.rb | 6 ++---- .../renderer/partial_renderer/collection_caching.rb | 2 +- actionview/lib/action_view/template/resolver.rb | 3 +-- 6 files changed, 12 insertions(+), 23 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 5387174467..37f0dd1ee4 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -140,30 +140,25 @@ module ActionView #:nodoc: include Helpers, ::ERB::Util, Context # Specify the proc used to decorate input tags that refer to attributes with errors. - cattr_accessor :field_error_proc - @@field_error_proc = Proc.new { |html_tag, instance| "
#{html_tag}
".html_safe } + cattr_accessor :field_error_proc, default: Proc.new { |html_tag, instance| "
#{html_tag}
".html_safe } # How to complete the streaming when an exception occurs. # This is our best guess: first try to close the attribute, then the tag. - cattr_accessor :streaming_completion_on_exception - @@streaming_completion_on_exception = %(">) + cattr_accessor :streaming_completion_on_exception, default: %(">) # Specify whether rendering within namespaced controllers should prefix # the partial paths for ActiveModel objects with the namespace. # (e.g., an Admin::PostsController would render @post using /admin/posts/_post.erb) - cattr_accessor :prefix_partial_path_with_controller_namespace - @@prefix_partial_path_with_controller_namespace = true + cattr_accessor :prefix_partial_path_with_controller_namespace, default: true # Specify default_formats that can be rendered. cattr_accessor :default_formats # Specify whether an error should be raised for missing translations - cattr_accessor :raise_on_missing_translations - @@raise_on_missing_translations = false + cattr_accessor :raise_on_missing_translations, default: false # Specify whether submit_tag should automatically disable on click - cattr_accessor :automatically_disable_submit_tag - @@automatically_disable_submit_tag = true + cattr_accessor :automatically_disable_submit_tag, default: true class_attribute :_routes class_attribute :logger diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 672269b811..4b2561e53d 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -474,7 +474,7 @@ module ActionView end private :apply_form_for_options! - mattr_accessor(:form_with_generates_remote_forms) { true } + mattr_accessor :form_with_generates_remote_forms, default: true # Creates a form tag based on mixing URLs, scopes, or models. # @@ -2318,8 +2318,6 @@ module ActionView end ActiveSupport.on_load(:action_view) do - cattr_accessor(:default_form_builder, instance_writer: false, instance_reader: false) do - ::ActionView::Helpers::FormBuilder - end + cattr_accessor :default_form_builder, instance_writer: false, instance_reader: false, default: ::ActionView::Helpers::FormBuilder end end diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index 47ed41a129..cc928f2b7a 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -11,8 +11,7 @@ module ActionView include TagHelper included do - mattr_accessor :debug_missing_translation - self.debug_missing_translation = true + mattr_accessor :debug_missing_translation, default: true end # Delegates to I18n#translate but also performs three additional diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index f385a7cd04..b7dbb38369 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -14,11 +14,9 @@ module ActionView class LookupContext #:nodoc: attr_accessor :prefixes, :rendered_format - mattr_accessor :fallbacks - @@fallbacks = FallbackFileSystemResolver.instances + mattr_accessor :fallbacks, default: FallbackFileSystemResolver.instances - mattr_accessor :registered_details - self.registered_details = [] + mattr_accessor :registered_details, default: [] def self.register_detail(name, &block) registered_details << name diff --git a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb index 847256ac78..32663fb80d 100644 --- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb @@ -5,7 +5,7 @@ module ActionView included do # Fallback cache store if Action View is used without Rails. # Otherwise overridden in Railtie to use Rails.cache. - mattr_accessor(:collection_cache) { ActiveSupport::Cache::MemoryStore.new } + mattr_accessor :collection_cache, default: ActiveSupport::Cache::MemoryStore.new end private diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index d3905b5f23..75ea4d31f5 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -125,8 +125,7 @@ module ActionView end end - cattr_accessor :caching - self.caching = true + cattr_accessor :caching, default: true class << self alias :caching? :caching -- cgit v1.2.3 From e732f29d33f1e856c4a10af694863420c9b79e67 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Thu, 27 Apr 2017 14:04:16 -0700 Subject: Move slicing to initializer. Forgot all about https://github.com/rails/rails/pull/28844/files#r113780934 cc @rafaelfranca --- actionview/lib/action_view/helpers/tags/base.rb | 2 +- actionview/lib/action_view/helpers/tags/select.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/tags/base.rb b/actionview/lib/action_view/helpers/tags/base.rb index aa420c4b66..0895533a60 100644 --- a/actionview/lib/action_view/helpers/tags/base.rb +++ b/actionview/lib/action_view/helpers/tags/base.rb @@ -149,7 +149,7 @@ module ActionView end value = options.fetch(:selected) { value(object) } - select = content_tag("select", add_options(option_tags, options, value), html_options.except!("skip_default_ids", "allow_method_names_outside_object")) + select = content_tag("select", add_options(option_tags, options, value), html_options) if html_options["multiple"] && options.fetch(:include_hidden, true) tag("input", disabled: html_options["disabled"], name: html_options["name"], type: "hidden", value: "") + select diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb index 9ff7e54e4f..380f7a8c4e 100644 --- a/actionview/lib/action_view/helpers/tags/select.rb +++ b/actionview/lib/action_view/helpers/tags/select.rb @@ -6,7 +6,7 @@ module ActionView @choices = block_given? ? template_object.capture { yield || "" } : choices @choices = @choices.to_a if @choices.is_a?(Range) - @html_options = html_options + @html_options = html_options.except(:skip_default_ids, :allow_method_names_outside_object) super(object_name, method_name, template_object, options) end -- cgit v1.2.3 From 2abf6ca0c8304a3cfcdae6e14060b561780be43c Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sun, 2 Apr 2017 00:24:03 +0800 Subject: Use a hash to record every partial's cache hit status instead of sharing a boolean. --- actionview/lib/action_view/base.rb | 1 + actionview/lib/action_view/helpers/cache_helper.rb | 6 ++++-- actionview/lib/action_view/renderer/partial_renderer.rb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 37f0dd1ee4..1808553239 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -202,6 +202,7 @@ module ActionView #:nodoc: @view_renderer = ActionView::Renderer.new(lookup_context) end + @cache_hit = {} assign(assigns) assign_controller(controller) _prepare_context diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index c3aecadcd6..dfa0956fe2 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -235,11 +235,13 @@ module ActionView end def fragment_for(name = {}, options = nil, &block) + # Some tests might using this helper without initialize actionview object + @cache_hit ||= {} if content = read_fragment_for(name, options) - @cache_hit = true + @cache_hit[@virtual_path] = true content else - @cache_hit = false + @cache_hit[@virtual_path] = false write_fragment_for(name, options, &block) end end diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 647b15ea94..797db34fb8 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -344,7 +344,7 @@ module ActionView end content = layout.render(view, locals) { content } if layout - payload[:cache_hit] = view.cache_hit + payload[:cache_hit] = !!view.cache_hit[@template.virtual_path] content end end -- cgit v1.2.3 From 8240636beda7b2b487217be1d945eb0d36145c4d Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Wed, 7 Jun 2017 22:17:34 +0200 Subject: Merge pull request https://github.com/rails/rails/pull/28637 from st0012/fix-partial-cache-logging --- actionview/lib/action_view/helpers/cache_helper.rb | 8 ++------ actionview/lib/action_view/log_subscriber.rb | 7 ++++--- actionview/lib/action_view/renderer/partial_renderer.rb | 2 +- actionview/lib/action_view/renderer/renderer.rb | 4 ++++ 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index dfa0956fe2..d515556e23 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -214,8 +214,6 @@ module ActionView end end - attr_reader :cache_hit # :nodoc: - private def fragment_name_with_digest(name, virtual_path) @@ -235,13 +233,11 @@ module ActionView end def fragment_for(name = {}, options = nil, &block) - # Some tests might using this helper without initialize actionview object - @cache_hit ||= {} if content = read_fragment_for(name, options) - @cache_hit[@virtual_path] = true + @view_renderer.cache_hits[@virtual_path] = :hit content else - @cache_hit[@virtual_path] = false + @view_renderer.cache_hits[@virtual_path] = :miss write_fragment_for(name, options, &block) end end diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index d03e1a51b8..ab8ec0aa42 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -25,7 +25,7 @@ module ActionView message = " Rendered #{from_rails_root(event.payload[:identifier])}" message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] message << " (#{event.duration.round(1)}ms)" - message << " #{cache_message(event.payload)}" if event.payload.key?(:cache_hit) + message << " #{cache_message(event.payload)}" unless event.payload[:cache_hit].nil? message end end @@ -73,9 +73,10 @@ module ActionView end def cache_message(payload) # :doc: - if payload[:cache_hit] + case payload[:cache_hit] + when :hit "[cache hit]" - else + when :miss "[cache miss]" end end diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 797db34fb8..1f8f997a2d 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -344,7 +344,7 @@ module ActionView end content = layout.render(view, locals) { content } if layout - payload[:cache_hit] = !!view.cache_hit[@template.virtual_path] + payload[:cache_hit] = view.view_renderer.cache_hits[@template.virtual_path] content end end diff --git a/actionview/lib/action_view/renderer/renderer.rb b/actionview/lib/action_view/renderer/renderer.rb index 2a3b89aebf..bcdeb85d30 100644 --- a/actionview/lib/action_view/renderer/renderer.rb +++ b/actionview/lib/action_view/renderer/renderer.rb @@ -46,5 +46,9 @@ module ActionView def render_partial(context, options, &block) #:nodoc: PartialRenderer.new(@lookup_context).render(context, options, block) end + + def cache_hits # :nodoc: + @cache_hits ||= {} + end end end -- cgit v1.2.3 From 73715f29ab4c56ebcd74403903ebd691677ef318 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Thu, 8 Jun 2017 21:56:24 +0200 Subject: Don't rely on the @view_renderer being defined. That won't be true for Action Pack and Action Mailer. --- actionview/lib/action_view/helpers/cache_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index d515556e23..b7c7324f31 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -234,10 +234,10 @@ module ActionView def fragment_for(name = {}, options = nil, &block) if content = read_fragment_for(name, options) - @view_renderer.cache_hits[@virtual_path] = :hit + @view_renderer.cache_hits[@virtual_path] = :hit if defined?(@view_renderer) content else - @view_renderer.cache_hits[@virtual_path] = :miss + @view_renderer.cache_hits[@virtual_path] = :miss if defined?(@view_renderer) write_fragment_for(name, options, &block) end end -- cgit v1.2.3 From bc9051422844c706b18fddc1449ea5e311c83490 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 11 Jun 2017 16:21:32 +0900 Subject: Generate field ids in `collection_check_boxes` and `collection_radio_buttons` This makes sure that the labels are linked up with the fields. Fixes #29014 --- actionview/lib/action_view/helpers/tags/collection_check_boxes.rb | 1 + actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb | 1 + 2 files changed, 2 insertions(+) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb index 7252d4f2d9..e02b7bdb2e 100644 --- a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb @@ -10,6 +10,7 @@ module ActionView def check_box(extra_html_options = {}) html_options = extra_html_options.merge(@input_html_options) html_options[:multiple] = true + html_options[:skip_default_ids] = false @template_object.check_box(@object_name, @method_name, html_options, @value, nil) end end diff --git a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index a5f72af9ff..f085a5fb73 100644 --- a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb @@ -9,6 +9,7 @@ module ActionView class RadioButtonBuilder < Builder # :nodoc: def radio_button(extra_html_options = {}) html_options = extra_html_options.merge(@input_html_options) + html_options[:skip_default_ids] = false @template_object.radio_button(@object_name, @method_name, @value, html_options) end end -- cgit v1.2.3 From 0c66c25ba4a92edcdd41a3eba31a208bdff3b2b5 Mon Sep 17 00:00:00 2001 From: savroff Date: Mon, 19 Jun 2017 18:01:20 -0400 Subject: Fix current_page? helper issue with engine root path --- actionview/lib/action_view/helpers/url_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index a6857101b9..b78c367921 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -552,7 +552,10 @@ module ActionView request_uri = url_string.index("?") || check_parameters ? request.fullpath : request.path request_uri = URI.parser.unescape(request_uri).force_encoding(Encoding::BINARY) - url_string.chomp!("/") if url_string.start_with?("/") && url_string != "/" + if url_string.start_with?("/") && url_string != "/" + url_string.chomp!("/") + request_uri.chomp!("/") + end if %r{^\w+://}.match?(url_string) url_string == "#{request.protocol}#{request.host_with_port}#{request_uri}" -- cgit v1.2.3 From 4ff30d9bb6d5d591fbb3952112d721c995059302 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Tue, 20 Jun 2017 18:35:44 +1000 Subject: Make ActiveModel frozen string literal friendly. Includes two external changes because they're referenced within the ActiveModel test suite. --- actionview/lib/action_view/helpers/javascript_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb index 22e1e74ad6..6ba70ec081 100644 --- a/actionview/lib/action_view/helpers/javascript_helper.rb +++ b/actionview/lib/action_view/helpers/javascript_helper.rb @@ -13,8 +13,8 @@ module ActionView "'" => "\\'" } - JS_ESCAPE_MAP["\342\200\250".force_encoding(Encoding::UTF_8).encode!] = "
" - JS_ESCAPE_MAP["\342\200\251".force_encoding(Encoding::UTF_8).encode!] = "
" + JS_ESCAPE_MAP["\342\200\250".dup.force_encoding(Encoding::UTF_8).encode!] = "
" + JS_ESCAPE_MAP["\342\200\251".dup.force_encoding(Encoding::UTF_8).encode!] = "
" # Escapes carriage returns and single and double quotes for JavaScript segments. # -- cgit v1.2.3 From dd491b24ff28f637b1c8879002adb1acdf20a8ac Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Tue, 20 Jun 2017 19:45:46 +1000 Subject: Make ActionMailer frozen string literal friendly. --- actionview/lib/action_view/template.rb | 4 ++-- actionview/lib/action_view/template/resolver.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index b0e2f1e54e..3a69860630 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -282,7 +282,7 @@ module ActionView # Make sure that the resulting String to be eval'd is in the # encoding of the code - source = <<-end_src + source = <<-end_src.dup def #{method_name}(local_assigns, output_buffer) _old_virtual_path, @virtual_path = @virtual_path, #{@virtual_path.inspect};_old_output_buffer = @output_buffer;#{locals_code};#{code} ensure @@ -334,7 +334,7 @@ module ActionView def method_name @method_name ||= begin - m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}" + m = "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}".dup m.tr!("-".freeze, "_".freeze) m end diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 75ea4d31f5..65f8be26a0 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -14,7 +14,7 @@ module ActionView alias_method :partial?, :partial def self.build(name, prefix, partial) - virtual = "" + virtual = "".dup virtual << "#{prefix}/" unless prefix.empty? virtual << (partial ? "_#{name}" : name) new name, prefix, partial, virtual -- cgit v1.2.3 From 3d453b409d037a056d0bcd636a2e020cc7cef4a8 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Tue, 20 Jun 2017 22:20:04 +1000 Subject: Make ActionView frozen string literal friendly. Plus a couple of related ActionPack patches. --- actionview/lib/action_view/helpers/date_helper.rb | 4 ++-- actionview/lib/action_view/helpers/translation_helper.rb | 2 +- actionview/lib/action_view/log_subscriber.rb | 4 ++-- actionview/lib/action_view/template.rb | 2 +- actionview/lib/action_view/test_case.rb | 2 +- actionview/lib/action_view/testing/resolvers.rb | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 3f43465aa4..d28eec88a1 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1007,7 +1007,7 @@ module ActionView select_options[:disabled] = "disabled" if @options[:disabled] select_options[:class] = css_class_attribute(type, select_options[:class], @options[:with_css_classes]) if @options[:with_css_classes] - select_html = "\n" + select_html = "\n".dup select_html << content_tag("option".freeze, "", value: "") + "\n" if @options[:include_blank] select_html << prompt_option_tag(type, @options[:prompt]) + "\n" if @options[:prompt] select_html << select_options_as_html @@ -1089,7 +1089,7 @@ module ActionView # Given an ordering of datetime components, create the selection HTML # and join them with their appropriate separators. def build_selects_from_types(order) - select = "" + select = "".dup first_visible = order.find { |type| !@options[:"discard_#{type}"] } order.reverse_each do |type| separator = separator(type) unless type == first_visible # don't add before first visible field diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index cc928f2b7a..24d1f34c5a 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -95,7 +95,7 @@ module ActionView raise e if raise_error keys = I18n.normalize_keys(e.locale, e.key, e.options[:scope]) - title = "translation missing: #{keys.join('.')}" + title = "translation missing: #{keys.join('.')}".dup interpolations = options.except(:default, :scope) if interpolations.any? diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index ab8ec0aa42..613be2b877 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -14,7 +14,7 @@ module ActionView def render_template(event) info do - message = " Rendered #{from_rails_root(event.payload[:identifier])}" + message = " Rendered #{from_rails_root(event.payload[:identifier])}".dup message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] message << " (#{event.duration.round(1)}ms)" end @@ -22,7 +22,7 @@ module ActionView def render_partial(event) info do - message = " Rendered #{from_rails_root(event.payload[:identifier])}" + message = " Rendered #{from_rails_root(event.payload[:identifier])}".dup message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout] message << " (#{event.duration.round(1)}ms)" message << " #{cache_message(event.payload)}" unless event.payload[:cache_hit].nil? diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 3a69860630..3f2546664e 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -329,7 +329,7 @@ module ActionView locals = locals.grep(/\A@?(?![A-Z0-9])(?:[[:alnum:]_]|[^\0-\177])+\z/) # Double assign to suppress the dreaded 'assigned but unused variable' warning - locals.each_with_object("") { |key, code| code << "#{key} = #{key} = local_assigns[:#{key}];" } + locals.each_with_object("".dup) { |key, code| code << "#{key} = #{key} = local_assigns[:#{key}];" } end def method_name diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 80403799ab..424a86ba3e 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -104,7 +104,7 @@ module ActionView # empty string ensures buffer has UTF-8 encoding as # new without arguments returns ASCII-8BIT encoded buffer like String#new @output_buffer = ActiveSupport::SafeBuffer.new "" - @rendered = "" + @rendered = "".dup make_test_case_available_to_view! say_no_to_protect_against_forgery! diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 3188526b63..b2d3e10690 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -20,7 +20,7 @@ module ActionView #:nodoc: private def query(path, exts, _, _) - query = "" + query = "".dup EXTENSIONS.each_key do |ext| query << "(" << exts[ext].map { |e| e && Regexp.escape(".#{e}") }.join("|") << "|)" end -- cgit v1.2.3 From 43efae22a7a59d5fe0be599bd074c5e7d881266a Mon Sep 17 00:00:00 2001 From: Roberto Miranda Date: Sat, 3 Jun 2017 11:30:01 -0500 Subject: Add `srcset` option to `image_tag` helper --- actionview/lib/action_view/helpers/asset_tag_helper.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index c21fe782c6..3d2b7e48fe 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -227,16 +227,30 @@ module ActionView # # => Icon # image_tag("/icons/icon.gif", data: { title: 'Rails Application' }) # # => + # image_tag("icon.png", srcset: "/assets/pic_640.jpg 640w, /assets/pic_1024.jpg 1024w, /assets/pic_1980.jpg 1980w", sizes: '100vw', class: 'my-image') + # + # image_tag("icon.png", srcset: { 'pic_640.jpg' => '640w', 'pic_1024.jpg' => '1024w', 'pic_1980.jpg' => '1980w' }, sizes: '100vw', class: 'my-image') + # + # image_tag("icon.png", srcset: [['pic_640.jpg', '640w'], ['pic_1024.jpg', '1024w'], ['pic_1980.jpg', '1980w']], sizes: '100vw', class: 'my-image') + # def image_tag(source, options = {}) options = options.symbolize_keys check_for_image_tag_errors(options) + skip_pipeline = options.delete(:skip_pipeline) - src = options[:src] = path_to_image(source, skip_pipeline: options.delete(:skip_pipeline)) + src = options[:src] = path_to_image(source, skip_pipeline: skip_pipeline) unless src.start_with?("cid:") || src.start_with?("data:") || src.blank? options[:alt] = options.fetch(:alt) { image_alt(src) } end + if options[:srcset] && !options[:srcset].is_a?(String) + options[:srcset] = options[:srcset].map do |src, size| + src_path = path_to_image(src, skip_pipeline: skip_pipeline) + "#{src_path} #{size}" + end.join(", ") + end + options[:width], options[:height] = extract_dimensions(options.delete(:size)) if options[:size] tag("img", options) end -- cgit v1.2.3 From cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 22 Jun 2017 22:59:18 -0400 Subject: Enforce frozen string in Rubocop --- actionview/lib/action_view.rb | 1 + actionview/lib/action_view/base.rb | 1 + actionview/lib/action_view/buffers.rb | 1 + actionview/lib/action_view/context.rb | 1 + actionview/lib/action_view/dependency_tracker.rb | 1 + actionview/lib/action_view/digestor.rb | 1 + actionview/lib/action_view/flows.rb | 1 + actionview/lib/action_view/gem_version.rb | 1 + actionview/lib/action_view/helpers.rb | 1 + actionview/lib/action_view/helpers/active_model_helper.rb | 1 + actionview/lib/action_view/helpers/asset_tag_helper.rb | 1 + actionview/lib/action_view/helpers/asset_url_helper.rb | 1 + actionview/lib/action_view/helpers/atom_feed_helper.rb | 1 + actionview/lib/action_view/helpers/cache_helper.rb | 1 + actionview/lib/action_view/helpers/capture_helper.rb | 1 + actionview/lib/action_view/helpers/controller_helper.rb | 1 + actionview/lib/action_view/helpers/csrf_helper.rb | 1 + actionview/lib/action_view/helpers/date_helper.rb | 1 + actionview/lib/action_view/helpers/debug_helper.rb | 1 + actionview/lib/action_view/helpers/form_helper.rb | 1 + actionview/lib/action_view/helpers/form_options_helper.rb | 1 + actionview/lib/action_view/helpers/form_tag_helper.rb | 1 + actionview/lib/action_view/helpers/javascript_helper.rb | 1 + actionview/lib/action_view/helpers/number_helper.rb | 1 + actionview/lib/action_view/helpers/output_safety_helper.rb | 1 + actionview/lib/action_view/helpers/record_tag_helper.rb | 1 + actionview/lib/action_view/helpers/rendering_helper.rb | 1 + actionview/lib/action_view/helpers/sanitize_helper.rb | 1 + actionview/lib/action_view/helpers/tag_helper.rb | 2 +- actionview/lib/action_view/helpers/tags.rb | 1 + actionview/lib/action_view/helpers/tags/base.rb | 1 + actionview/lib/action_view/helpers/tags/check_box.rb | 1 + actionview/lib/action_view/helpers/tags/checkable.rb | 1 + actionview/lib/action_view/helpers/tags/collection_check_boxes.rb | 1 + actionview/lib/action_view/helpers/tags/collection_helpers.rb | 1 + actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb | 1 + actionview/lib/action_view/helpers/tags/collection_select.rb | 1 + actionview/lib/action_view/helpers/tags/color_field.rb | 1 + actionview/lib/action_view/helpers/tags/date_field.rb | 1 + actionview/lib/action_view/helpers/tags/date_select.rb | 1 + actionview/lib/action_view/helpers/tags/datetime_field.rb | 1 + actionview/lib/action_view/helpers/tags/datetime_local_field.rb | 1 + actionview/lib/action_view/helpers/tags/datetime_select.rb | 1 + actionview/lib/action_view/helpers/tags/email_field.rb | 1 + actionview/lib/action_view/helpers/tags/file_field.rb | 1 + actionview/lib/action_view/helpers/tags/grouped_collection_select.rb | 1 + actionview/lib/action_view/helpers/tags/hidden_field.rb | 1 + actionview/lib/action_view/helpers/tags/label.rb | 1 + actionview/lib/action_view/helpers/tags/month_field.rb | 1 + actionview/lib/action_view/helpers/tags/number_field.rb | 1 + actionview/lib/action_view/helpers/tags/password_field.rb | 1 + actionview/lib/action_view/helpers/tags/placeholderable.rb | 1 + actionview/lib/action_view/helpers/tags/radio_button.rb | 1 + actionview/lib/action_view/helpers/tags/range_field.rb | 1 + actionview/lib/action_view/helpers/tags/search_field.rb | 1 + actionview/lib/action_view/helpers/tags/select.rb | 1 + actionview/lib/action_view/helpers/tags/tel_field.rb | 1 + actionview/lib/action_view/helpers/tags/text_area.rb | 1 + actionview/lib/action_view/helpers/tags/text_field.rb | 1 + actionview/lib/action_view/helpers/tags/time_field.rb | 1 + actionview/lib/action_view/helpers/tags/time_select.rb | 1 + actionview/lib/action_view/helpers/tags/time_zone_select.rb | 1 + actionview/lib/action_view/helpers/tags/translator.rb | 1 + actionview/lib/action_view/helpers/tags/url_field.rb | 1 + actionview/lib/action_view/helpers/tags/week_field.rb | 1 + actionview/lib/action_view/helpers/text_helper.rb | 1 + actionview/lib/action_view/helpers/translation_helper.rb | 1 + actionview/lib/action_view/helpers/url_helper.rb | 1 + actionview/lib/action_view/layouts.rb | 1 + actionview/lib/action_view/log_subscriber.rb | 1 + actionview/lib/action_view/lookup_context.rb | 1 + actionview/lib/action_view/model_naming.rb | 1 + actionview/lib/action_view/path_set.rb | 1 + actionview/lib/action_view/railtie.rb | 1 + actionview/lib/action_view/record_identifier.rb | 1 + actionview/lib/action_view/renderer/abstract_renderer.rb | 1 + actionview/lib/action_view/renderer/partial_renderer.rb | 1 + .../lib/action_view/renderer/partial_renderer/collection_caching.rb | 1 + actionview/lib/action_view/renderer/renderer.rb | 1 + actionview/lib/action_view/renderer/streaming_template_renderer.rb | 1 + actionview/lib/action_view/renderer/template_renderer.rb | 1 + actionview/lib/action_view/rendering.rb | 1 + actionview/lib/action_view/routing_url_for.rb | 1 + actionview/lib/action_view/tasks/cache_digests.rake | 1 + actionview/lib/action_view/template.rb | 1 + actionview/lib/action_view/template/error.rb | 1 + actionview/lib/action_view/template/handlers.rb | 1 + actionview/lib/action_view/template/handlers/builder.rb | 1 + actionview/lib/action_view/template/handlers/erb.rb | 1 + actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb | 1 + actionview/lib/action_view/template/handlers/erb/erubi.rb | 1 + actionview/lib/action_view/template/handlers/erb/erubis.rb | 1 + actionview/lib/action_view/template/handlers/html.rb | 1 + actionview/lib/action_view/template/handlers/raw.rb | 1 + actionview/lib/action_view/template/html.rb | 1 + actionview/lib/action_view/template/resolver.rb | 1 + actionview/lib/action_view/template/text.rb | 1 + actionview/lib/action_view/template/types.rb | 1 + actionview/lib/action_view/test_case.rb | 1 + actionview/lib/action_view/testing/resolvers.rb | 1 + actionview/lib/action_view/version.rb | 1 + actionview/lib/action_view/view_paths.rb | 1 + 102 files changed, 102 insertions(+), 1 deletion(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view.rb b/actionview/lib/action_view.rb index 99c5b831b5..c125651a64 100644 --- a/actionview/lib/action_view.rb +++ b/actionview/lib/action_view.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 1808553239..51f8202de4 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" require "active_support/core_ext/module/attribute_accessors" require "active_support/ordered_options" diff --git a/actionview/lib/action_view/buffers.rb b/actionview/lib/action_view/buffers.rb index 089daa6d60..824995582b 100644 --- a/actionview/lib/action_view/buffers.rb +++ b/actionview/lib/action_view/buffers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/context.rb b/actionview/lib/action_view/context.rb index 31aa73a0cf..3a24a7692e 100644 --- a/actionview/lib/action_view/context.rb +++ b/actionview/lib/action_view/context.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module CompiledTemplates #:nodoc: # holds compiled template code diff --git a/actionview/lib/action_view/dependency_tracker.rb b/actionview/lib/action_view/dependency_tracker.rb index 451eeec9d6..9128494501 100644 --- a/actionview/lib/action_view/dependency_tracker.rb +++ b/actionview/lib/action_view/dependency_tracker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "action_view/path_set" diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 5ddf1ceb66..9a5e11699c 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "action_view/dependency_tracker" require "monitor" diff --git a/actionview/lib/action_view/flows.rb b/actionview/lib/action_view/flows.rb index 6d5f57a570..d933f05456 100644 --- a/actionview/lib/action_view/flows.rb +++ b/actionview/lib/action_view/flows.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/gem_version.rb b/actionview/lib/action_view/gem_version.rb index 92e21d7a4f..44425b4aa3 100644 --- a/actionview/lib/action_view/gem_version.rb +++ b/actionview/lib/action_view/gem_version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # Returns the version of the currently loaded Action View as a Gem::Version def self.gem_version diff --git a/actionview/lib/action_view/helpers.rb b/actionview/lib/action_view/helpers.rb index c1b4b4f84b..b98041252c 100644 --- a/actionview/lib/action_view/helpers.rb +++ b/actionview/lib/action_view/helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/benchmarkable" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/helpers/active_model_helper.rb b/actionview/lib/action_view/helpers/active_model_helper.rb index 4bb5788a16..ba3b5801c9 100644 --- a/actionview/lib/action_view/helpers/active_model_helper.rb +++ b/actionview/lib/action_view/helpers/active_model_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ext/enumerable" diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index c21fe782c6..791454ca87 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/hash/keys" require "action_view/helpers/asset_url_helper" diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb index 03bd1eb008..f9f12fdba5 100644 --- a/actionview/lib/action_view/helpers/asset_url_helper.rb +++ b/actionview/lib/action_view/helpers/asset_url_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "zlib" module ActionView diff --git a/actionview/lib/action_view/helpers/atom_feed_helper.rb b/actionview/lib/action_view/helpers/atom_feed_helper.rb index 3538515aee..a4ec1f9388 100644 --- a/actionview/lib/action_view/helpers/atom_feed_helper.rb +++ b/actionview/lib/action_view/helpers/atom_feed_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "set" module ActionView diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index b7c7324f31..101fe86e9f 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # = Action View Cache Helper module Helpers diff --git a/actionview/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb index 719592b5c5..0865ac0a7e 100644 --- a/actionview/lib/action_view/helpers/capture_helper.rb +++ b/actionview/lib/action_view/helpers/capture_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/helpers/controller_helper.rb b/actionview/lib/action_view/helpers/controller_helper.rb index e86cdca4e4..0991fc16e0 100644 --- a/actionview/lib/action_view/helpers/controller_helper.rb +++ b/actionview/lib/action_view/helpers/controller_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" module ActionView diff --git a/actionview/lib/action_view/helpers/csrf_helper.rb b/actionview/lib/action_view/helpers/csrf_helper.rb index 2a15d2aa5a..f560445b83 100644 --- a/actionview/lib/action_view/helpers/csrf_helper.rb +++ b/actionview/lib/action_view/helpers/csrf_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # = Action View CSRF Helper module Helpers diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 3f43465aa4..2c30f88c3b 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "date" require "action_view/helpers/tag_helper" require "active_support/core_ext/array/extract_options" diff --git a/actionview/lib/action_view/helpers/debug_helper.rb b/actionview/lib/action_view/helpers/debug_helper.rb index f61ca2c9c2..26c97ab2bf 100644 --- a/actionview/lib/action_view/helpers/debug_helper.rb +++ b/actionview/lib/action_view/helpers/debug_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # = Action View Debug Helper # diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 4b2561e53d..4a1e6ae9bd 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" require "action_view/helpers/date_helper" require "action_view/helpers/tag_helper" diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb index 07d4310a4e..7d0fbce34e 100644 --- a/actionview/lib/action_view/helpers/form_options_helper.rb +++ b/actionview/lib/action_view/helpers/form_options_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" require "erb" require "action_view/helpers/form_helper" diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 9fc08b3837..8225fa1e38 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cgi" require "action_view/helpers/tag_helper" require "active_support/core_ext/string/output_safety" diff --git a/actionview/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb index 22e1e74ad6..2c93647534 100644 --- a/actionview/lib/action_view/helpers/javascript_helper.rb +++ b/actionview/lib/action_view/helpers/javascript_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tag_helper" module ActionView diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index b6bc5f4f6f..e40041cb74 100644 --- a/actionview/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/output_safety" require "active_support/number_helper" diff --git a/actionview/lib/action_view/helpers/output_safety_helper.rb b/actionview/lib/action_view/helpers/output_safety_helper.rb index 25defd1276..71e5862698 100644 --- a/actionview/lib/action_view/helpers/output_safety_helper.rb +++ b/actionview/lib/action_view/helpers/output_safety_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/helpers/record_tag_helper.rb b/actionview/lib/action_view/helpers/record_tag_helper.rb index f7ee573035..7aca005d46 100644 --- a/actionview/lib/action_view/helpers/record_tag_helper.rb +++ b/actionview/lib/action_view/helpers/record_tag_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module RecordTagHelper diff --git a/actionview/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb index 7d7f2393ff..ffb5627805 100644 --- a/actionview/lib/action_view/helpers/rendering_helper.rb +++ b/actionview/lib/action_view/helpers/rendering_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers # = Action View Rendering diff --git a/actionview/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb index 0abd5bc5dc..b7757086c3 100644 --- a/actionview/lib/action_view/helpers/sanitize_helper.rb +++ b/actionview/lib/action_view/helpers/sanitize_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" require "rails-html-sanitizer" diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 306b71c85e..a64d7e396e 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -1,4 +1,4 @@ -# frozen-string-literal: true +# frozen_string_literal: true require "active_support/core_ext/string/output_safety" require "set" diff --git a/actionview/lib/action_view/helpers/tags.rb b/actionview/lib/action_view/helpers/tags.rb index a4f6eb0150..ec06617891 100644 --- a/actionview/lib/action_view/helpers/tags.rb +++ b/actionview/lib/action_view/helpers/tags.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags #:nodoc: diff --git a/actionview/lib/action_view/helpers/tags/base.rb b/actionview/lib/action_view/helpers/tags/base.rb index 0895533a60..dec1c1f070 100644 --- a/actionview/lib/action_view/helpers/tags/base.rb +++ b/actionview/lib/action_view/helpers/tags/base.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/check_box.rb b/actionview/lib/action_view/helpers/tags/check_box.rb index 02f87fc89f..88da221eb2 100644 --- a/actionview/lib/action_view/helpers/tags/check_box.rb +++ b/actionview/lib/action_view/helpers/tags/check_box.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/checkable.rb b/actionview/lib/action_view/helpers/tags/checkable.rb index 052e9df662..a3638aa3fa 100644 --- a/actionview/lib/action_view/helpers/tags/checkable.rb +++ b/actionview/lib/action_view/helpers/tags/checkable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb index e02b7bdb2e..1e9f6a1cee 100644 --- a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/collection_helpers.rb b/actionview/lib/action_view/helpers/tags/collection_helpers.rb index 75d237eb35..7f0296e466 100644 --- a/actionview/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index f085a5fb73..85648991d7 100644 --- a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/collection_select.rb b/actionview/lib/action_view/helpers/tags/collection_select.rb index 4365c714eb..c6a81cf795 100644 --- a/actionview/lib/action_view/helpers/tags/collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/collection_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/color_field.rb b/actionview/lib/action_view/helpers/tags/color_field.rb index b4bbe92746..c133fcab77 100644 --- a/actionview/lib/action_view/helpers/tags/color_field.rb +++ b/actionview/lib/action_view/helpers/tags/color_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/date_field.rb b/actionview/lib/action_view/helpers/tags/date_field.rb index c22be0db29..2043a05689 100644 --- a/actionview/lib/action_view/helpers/tags/date_field.rb +++ b/actionview/lib/action_view/helpers/tags/date_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/date_select.rb b/actionview/lib/action_view/helpers/tags/date_select.rb index 638c134deb..fdfcad7e48 100644 --- a/actionview/lib/action_view/helpers/tags/date_select.rb +++ b/actionview/lib/action_view/helpers/tags/date_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/time/calculations" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/datetime_field.rb b/actionview/lib/action_view/helpers/tags/datetime_field.rb index b3940c7e44..4686606806 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/datetime_local_field.rb b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb index b4a74185d1..ba0c7fa5f7 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_local_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/datetime_select.rb b/actionview/lib/action_view/helpers/tags/datetime_select.rb index 563de1840e..3a36e47714 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_select.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/email_field.rb b/actionview/lib/action_view/helpers/tags/email_field.rb index 7ce3ccb9bf..4ba0905cfb 100644 --- a/actionview/lib/action_view/helpers/tags/email_field.rb +++ b/actionview/lib/action_view/helpers/tags/email_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/file_field.rb b/actionview/lib/action_view/helpers/tags/file_field.rb index 476b820d84..201b7fffa5 100644 --- a/actionview/lib/action_view/helpers/tags/file_field.rb +++ b/actionview/lib/action_view/helpers/tags/file_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb index 20e312dd0f..1b3f993b32 100644 --- a/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/hidden_field.rb b/actionview/lib/action_view/helpers/tags/hidden_field.rb index c3757c2461..ca5cd395a2 100644 --- a/actionview/lib/action_view/helpers/tags/hidden_field.rb +++ b/actionview/lib/action_view/helpers/tags/hidden_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb index cab15ae201..9f8dac4bbd 100644 --- a/actionview/lib/action_view/helpers/tags/label.rb +++ b/actionview/lib/action_view/helpers/tags/label.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/month_field.rb b/actionview/lib/action_view/helpers/tags/month_field.rb index 4c0fb846ee..ed74ca3f35 100644 --- a/actionview/lib/action_view/helpers/tags/month_field.rb +++ b/actionview/lib/action_view/helpers/tags/month_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/number_field.rb b/actionview/lib/action_view/helpers/tags/number_field.rb index 4f95b1b4de..fc5adfeab1 100644 --- a/actionview/lib/action_view/helpers/tags/number_field.rb +++ b/actionview/lib/action_view/helpers/tags/number_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/password_field.rb b/actionview/lib/action_view/helpers/tags/password_field.rb index 444ef65074..008df0f817 100644 --- a/actionview/lib/action_view/helpers/tags/password_field.rb +++ b/actionview/lib/action_view/helpers/tags/password_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/placeholderable.rb b/actionview/lib/action_view/helpers/tags/placeholderable.rb index cf7b117614..5ae57cdeef 100644 --- a/actionview/lib/action_view/helpers/tags/placeholderable.rb +++ b/actionview/lib/action_view/helpers/tags/placeholderable.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/radio_button.rb b/actionview/lib/action_view/helpers/tags/radio_button.rb index 43dbd32083..538826f749 100644 --- a/actionview/lib/action_view/helpers/tags/radio_button.rb +++ b/actionview/lib/action_view/helpers/tags/radio_button.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/range_field.rb b/actionview/lib/action_view/helpers/tags/range_field.rb index f98ae88043..d7c11cc7a4 100644 --- a/actionview/lib/action_view/helpers/tags/range_field.rb +++ b/actionview/lib/action_view/helpers/tags/range_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/search_field.rb b/actionview/lib/action_view/helpers/tags/search_field.rb index a848aeabfa..38304d8d73 100644 --- a/actionview/lib/action_view/helpers/tags/search_field.rb +++ b/actionview/lib/action_view/helpers/tags/search_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb index 380f7a8c4e..8c166d630f 100644 --- a/actionview/lib/action_view/helpers/tags/select.rb +++ b/actionview/lib/action_view/helpers/tags/select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/tel_field.rb b/actionview/lib/action_view/helpers/tags/tel_field.rb index 987bb9e67a..c95127a714 100644 --- a/actionview/lib/action_view/helpers/tags/tel_field.rb +++ b/actionview/lib/action_view/helpers/tags/tel_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/text_area.rb b/actionview/lib/action_view/helpers/tags/text_area.rb index 31e3a9e9b1..6bf3c0c02f 100644 --- a/actionview/lib/action_view/helpers/tags/text_area.rb +++ b/actionview/lib/action_view/helpers/tags/text_area.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/text_field.rb b/actionview/lib/action_view/helpers/tags/text_field.rb index 613cade7b3..48930770be 100644 --- a/actionview/lib/action_view/helpers/tags/text_field.rb +++ b/actionview/lib/action_view/helpers/tags/text_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/time_field.rb b/actionview/lib/action_view/helpers/tags/time_field.rb index 0e90a3aed7..8c3f082359 100644 --- a/actionview/lib/action_view/helpers/tags/time_field.rb +++ b/actionview/lib/action_view/helpers/tags/time_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/time_select.rb b/actionview/lib/action_view/helpers/tags/time_select.rb index 0b06311d25..d46728698f 100644 --- a/actionview/lib/action_view/helpers/tags/time_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/time_zone_select.rb b/actionview/lib/action_view/helpers/tags/time_zone_select.rb index 80d165ec7e..49e099d38a 100644 --- a/actionview/lib/action_view/helpers/tags/time_zone_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_zone_select.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/translator.rb b/actionview/lib/action_view/helpers/tags/translator.rb index ced835eaa8..0d3ac24689 100644 --- a/actionview/lib/action_view/helpers/tags/translator.rb +++ b/actionview/lib/action_view/helpers/tags/translator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/url_field.rb b/actionview/lib/action_view/helpers/tags/url_field.rb index d76340178d..4c474a579f 100644 --- a/actionview/lib/action_view/helpers/tags/url_field.rb +++ b/actionview/lib/action_view/helpers/tags/url_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/week_field.rb b/actionview/lib/action_view/helpers/tags/week_field.rb index 835d1667d7..08c6fbb81d 100644 --- a/actionview/lib/action_view/helpers/tags/week_field.rb +++ b/actionview/lib/action_view/helpers/tags/week_field.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index bc922f9ce8..4fce229276 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/string/filters" require "active_support/core_ext/array/extract_options" diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index cc928f2b7a..a1f8b6307c 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/tag_helper" require "active_support/core_ext/string/access" require "i18n/exceptions" diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index b78c367921..6bdb8e90ff 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/helpers/javascript_helper" require "active_support/core_ext/array/access" require "active_support/core_ext/hash/keys" diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index ab8409e8d0..f5681668e5 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/rendering" require "active_support/core_ext/module/remove_method" diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index ab8ec0aa42..dd8729adf7 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/log_subscriber" module ActionView diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index b7dbb38369..0220ac3a42 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "active_support/core_ext/module/remove_method" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/model_naming.rb b/actionview/lib/action_view/model_naming.rb index b6ed13424e..5eab00cd1a 100644 --- a/actionview/lib/action_view/model_naming.rb +++ b/actionview/lib/action_view/model_naming.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module ModelNaming #:nodoc: # Converts the given object to an ActiveModel compliant one. diff --git a/actionview/lib/action_view/path_set.rb b/actionview/lib/action_view/path_set.rb index 6688519ffd..0ac5778273 100644 --- a/actionview/lib/action_view/path_set.rb +++ b/actionview/lib/action_view/path_set.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View PathSet # diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 61678933e9..3971dc0aed 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view" require "rails" diff --git a/actionview/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb index 48bea315a9..885f935248 100644 --- a/actionview/lib/action_view/record_identifier.rb +++ b/actionview/lib/action_view/record_identifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module" require "action_view/model_naming" diff --git a/actionview/lib/action_view/renderer/abstract_renderer.rb b/actionview/lib/action_view/renderer/abstract_renderer.rb index 0b315eb569..217b05b5f3 100644 --- a/actionview/lib/action_view/renderer/abstract_renderer.rb +++ b/actionview/lib/action_view/renderer/abstract_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # This class defines the interface for a renderer. Each class that # subclasses +AbstractRenderer+ is used by the base +Renderer+ class to diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 1f8f997a2d..0bc414677f 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "concurrent/map" require "action_view/renderer/partial_renderer/collection_caching" diff --git a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb index 32663fb80d..61cb6c90b9 100644 --- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module CollectionCaching # :nodoc: extend ActiveSupport::Concern diff --git a/actionview/lib/action_view/renderer/renderer.rb b/actionview/lib/action_view/renderer/renderer.rb index bcdeb85d30..07461d3e2e 100644 --- a/actionview/lib/action_view/renderer/renderer.rb +++ b/actionview/lib/action_view/renderer/renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView # This is the main entry point for rendering. It basically delegates # to other objects like TemplateRenderer and PartialRenderer which diff --git a/actionview/lib/action_view/renderer/streaming_template_renderer.rb b/actionview/lib/action_view/renderer/streaming_template_renderer.rb index 62ce985243..40d7ce63a6 100644 --- a/actionview/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionview/lib/action_view/renderer/streaming_template_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "fiber" module ActionView diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 54317199de..1fe95a5f67 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" module ActionView diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index cf18562c45..29cdbf37cb 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/view_paths" module ActionView diff --git a/actionview/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb index 687ba7c1b4..3f6b59cf98 100644 --- a/actionview/lib/action_view/routing_url_for.rb +++ b/actionview/lib/action_view/routing_url_for.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_dispatch/routing/polymorphic_routes" module ActionView diff --git a/actionview/lib/action_view/tasks/cache_digests.rake b/actionview/lib/action_view/tasks/cache_digests.rake index d30b3f7797..929bace6d4 100644 --- a/actionview/lib/action_view/tasks/cache_digests.rake +++ b/actionview/lib/action_view/tasks/cache_digests.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :cache_digests do desc "Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)" task nested_dependencies: :environment do diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index b0e2f1e54e..ccd8af2559 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" require "active_support/core_ext/kernel/singleton_class" require "thread" diff --git a/actionview/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb index cc90477190..c2f13eb77c 100644 --- a/actionview/lib/action_view/template/error.rb +++ b/actionview/lib/action_view/template/error.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/enumerable" module ActionView diff --git a/actionview/lib/action_view/template/handlers.rb b/actionview/lib/action_view/template/handlers.rb index f4301f6f07..d5300ea659 100644 --- a/actionview/lib/action_view/template/handlers.rb +++ b/actionview/lib/action_view/template/handlers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View Template Handlers class Template diff --git a/actionview/lib/action_view/template/handlers/builder.rb b/actionview/lib/action_view/template/handlers/builder.rb index 67ad78133d..f8f5b96704 100644 --- a/actionview/lib/action_view/template/handlers/builder.rb +++ b/actionview/lib/action_view/template/handlers/builder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Template::Handlers class Builder diff --git a/actionview/lib/action_view/template/handlers/erb.rb b/actionview/lib/action_view/template/handlers/erb.rb index 48c2e22a89..fc2a901fa9 100644 --- a/actionview/lib/action_view/template/handlers/erb.rb +++ b/actionview/lib/action_view/template/handlers/erb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView class Template module Handlers diff --git a/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb b/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb index 427ea20064..59d6018f93 100644 --- a/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb +++ b/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ::ActiveSupport::Deprecation.warn("ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead.") module ActionView diff --git a/actionview/lib/action_view/template/handlers/erb/erubi.rb b/actionview/lib/action_view/template/handlers/erb/erubi.rb index 755cc84015..85750d57ca 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubi.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "erubi" module ActionView diff --git a/actionview/lib/action_view/template/handlers/erb/erubis.rb b/actionview/lib/action_view/template/handlers/erb/erubis.rb index f3c35e1aec..43a3731f8b 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubis.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubis.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true gem "erubis" require "erubis" diff --git a/actionview/lib/action_view/template/handlers/html.rb b/actionview/lib/action_view/template/handlers/html.rb index ccaa8d1469..215de5cfa2 100644 --- a/actionview/lib/action_view/template/handlers/html.rb +++ b/actionview/lib/action_view/template/handlers/html.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Template::Handlers class Html < Raw diff --git a/actionview/lib/action_view/template/handlers/raw.rb b/actionview/lib/action_view/template/handlers/raw.rb index e7519e94f9..6fc46aaa93 100644 --- a/actionview/lib/action_view/template/handlers/raw.rb +++ b/actionview/lib/action_view/template/handlers/raw.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module Template::Handlers class Raw diff --git a/actionview/lib/action_view/template/html.rb b/actionview/lib/action_view/template/html.rb index 0ffae10432..e2d2d05ec7 100644 --- a/actionview/lib/action_view/template/html.rb +++ b/actionview/lib/action_view/template/html.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View HTML Template class Template diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 75ea4d31f5..32d2db3e57 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "pathname" require "active_support/core_ext/class" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 380528d6ef..8249b27aa0 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView #:nodoc: # = Action View Text Template class Template diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 21959a3798..6f00fd0a3b 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module ActionView diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 80403799ab..f149d66bf9 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/module/remove_method" require "action_controller" require "action_controller/test_case" diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 3188526b63..4e7fe43066 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "action_view/template/resolver" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/version.rb b/actionview/lib/action_view/version.rb index 315404864d..3d4e517f99 100644 --- a/actionview/lib/action_view/version.rb +++ b/actionview/lib/action_view/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "gem_version" module ActionView diff --git a/actionview/lib/action_view/view_paths.rb b/actionview/lib/action_view/view_paths.rb index 938f0fc17f..bbff56f88d 100644 --- a/actionview/lib/action_view/view_paths.rb +++ b/actionview/lib/action_view/view_paths.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module ActionView module ViewPaths extend ActiveSupport::Concern -- cgit v1.2.3 From c4d1a4efeec6f0b5b58222993aa0bec85a19b6a8 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 30 Jun 2017 14:13:53 +0900 Subject: [Action View] require => require_relative --- actionview/lib/action_view.rb | 2 +- actionview/lib/action_view/base.rb | 10 +++++----- actionview/lib/action_view/dependency_tracker.rb | 2 +- actionview/lib/action_view/digestor.rb | 2 +- actionview/lib/action_view/helpers/asset_tag_helper.rb | 4 ++-- actionview/lib/action_view/helpers/date_helper.rb | 2 +- actionview/lib/action_view/helpers/form_helper.rb | 12 ++++++------ actionview/lib/action_view/helpers/form_options_helper.rb | 2 +- actionview/lib/action_view/helpers/form_tag_helper.rb | 2 +- actionview/lib/action_view/helpers/javascript_helper.rb | 2 +- actionview/lib/action_view/helpers/tags/check_box.rb | 2 +- .../lib/action_view/helpers/tags/collection_check_boxes.rb | 2 +- .../lib/action_view/helpers/tags/collection_radio_buttons.rb | 2 +- actionview/lib/action_view/helpers/tags/radio_button.rb | 2 +- actionview/lib/action_view/helpers/tags/text_area.rb | 2 +- actionview/lib/action_view/helpers/tags/text_field.rb | 2 +- actionview/lib/action_view/helpers/translation_helper.rb | 2 +- actionview/lib/action_view/helpers/url_helper.rb | 2 +- actionview/lib/action_view/layouts.rb | 2 +- actionview/lib/action_view/lookup_context.rb | 2 +- actionview/lib/action_view/record_identifier.rb | 2 +- actionview/lib/action_view/renderer/partial_renderer.rb | 2 +- actionview/lib/action_view/rendering.rb | 2 +- actionview/lib/action_view/template/resolver.rb | 2 +- actionview/lib/action_view/testing/resolvers.rb | 2 +- 25 files changed, 35 insertions(+), 35 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view.rb b/actionview/lib/action_view.rb index 99c5b831b5..53a83d48f6 100644 --- a/actionview/lib/action_view.rb +++ b/actionview/lib/action_view.rb @@ -23,7 +23,7 @@ require "active_support" require "active_support/rails" -require "action_view/version" +require_relative "action_view/version" module ActionView extend ActiveSupport::Autoload diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 1808553239..969d300bc1 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -1,11 +1,11 @@ require "active_support/core_ext/module/attr_internal" require "active_support/core_ext/module/attribute_accessors" require "active_support/ordered_options" -require "action_view/log_subscriber" -require "action_view/helpers" -require "action_view/context" -require "action_view/template" -require "action_view/lookup_context" +require_relative "log_subscriber" +require_relative "helpers" +require_relative "context" +require_relative "template" +require_relative "lookup_context" module ActionView #:nodoc: # = Action View Base diff --git a/actionview/lib/action_view/dependency_tracker.rb b/actionview/lib/action_view/dependency_tracker.rb index 451eeec9d6..ee438f9311 100644 --- a/actionview/lib/action_view/dependency_tracker.rb +++ b/actionview/lib/action_view/dependency_tracker.rb @@ -1,5 +1,5 @@ require "concurrent/map" -require "action_view/path_set" +require_relative "path_set" module ActionView class DependencyTracker # :nodoc: diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 5ddf1ceb66..00ff36c879 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -1,5 +1,5 @@ require "concurrent/map" -require "action_view/dependency_tracker" +require_relative "dependency_tracker" require "monitor" module ActionView diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index c21fe782c6..d4db2abbe1 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -1,7 +1,7 @@ require "active_support/core_ext/array/extract_options" require "active_support/core_ext/hash/keys" -require "action_view/helpers/asset_url_helper" -require "action_view/helpers/tag_helper" +require_relative "asset_url_helper" +require_relative "tag_helper" module ActionView # = Action View Asset Tag Helpers diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 3f43465aa4..80ca3f076c 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1,5 +1,5 @@ require "date" -require "action_view/helpers/tag_helper" +require_relative "tag_helper" require "active_support/core_ext/array/extract_options" require "active_support/core_ext/date/conversions" require "active_support/core_ext/hash/slice" diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 4b2561e53d..6b36c2272a 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1,10 +1,10 @@ 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_relative "date_helper" +require_relative "tag_helper" +require_relative "form_tag_helper" +require_relative "active_model_helper" +require_relative "../model_naming" +require_relative "../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" diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb index 07d4310a4e..0de3800a51 100644 --- a/actionview/lib/action_view/helpers/form_options_helper.rb +++ b/actionview/lib/action_view/helpers/form_options_helper.rb @@ -1,6 +1,6 @@ require "cgi" require "erb" -require "action_view/helpers/form_helper" +require_relative "form_helper" require "active_support/core_ext/string/output_safety" require "active_support/core_ext/array/extract_options" require "active_support/core_ext/array/wrap" diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 9fc08b3837..c8c6632781 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -1,5 +1,5 @@ require "cgi" -require "action_view/helpers/tag_helper" +require_relative "tag_helper" require "active_support/core_ext/string/output_safety" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb index 22e1e74ad6..ea0b877de5 100644 --- a/actionview/lib/action_view/helpers/javascript_helper.rb +++ b/actionview/lib/action_view/helpers/javascript_helper.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tag_helper" +require_relative "tag_helper" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/tags/check_box.rb b/actionview/lib/action_view/helpers/tags/check_box.rb index 02f87fc89f..b9b988325d 100644 --- a/actionview/lib/action_view/helpers/tags/check_box.rb +++ b/actionview/lib/action_view/helpers/tags/check_box.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tags/checkable" +require_relative "checkable" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb index e02b7bdb2e..ef37c1c342 100644 --- a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tags/collection_helpers" +require_relative "collection_helpers" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index f085a5fb73..c7d28905d0 100644 --- a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tags/collection_helpers" +require_relative "collection_helpers" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/tags/radio_button.rb b/actionview/lib/action_view/helpers/tags/radio_button.rb index 43dbd32083..782263ac5b 100644 --- a/actionview/lib/action_view/helpers/tags/radio_button.rb +++ b/actionview/lib/action_view/helpers/tags/radio_button.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tags/checkable" +require_relative "checkable" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/tags/text_area.rb b/actionview/lib/action_view/helpers/tags/text_area.rb index 31e3a9e9b1..1058fdf55f 100644 --- a/actionview/lib/action_view/helpers/tags/text_area.rb +++ b/actionview/lib/action_view/helpers/tags/text_area.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tags/placeholderable" +require_relative "placeholderable" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/tags/text_field.rb b/actionview/lib/action_view/helpers/tags/text_field.rb index 613cade7b3..1d55105587 100644 --- a/actionview/lib/action_view/helpers/tags/text_field.rb +++ b/actionview/lib/action_view/helpers/tags/text_field.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tags/placeholderable" +require_relative "placeholderable" module ActionView module Helpers diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index cc928f2b7a..f670d9956c 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/tag_helper" +require_relative "tag_helper" require "active_support/core_ext/string/access" require "i18n/exceptions" diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index b78c367921..644e1e4391 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -1,4 +1,4 @@ -require "action_view/helpers/javascript_helper" +require_relative "javascript_helper" require "active_support/core_ext/array/access" require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/output_safety" diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index ab8409e8d0..b62fde30e8 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -1,4 +1,4 @@ -require "action_view/rendering" +require_relative "rendering" require "active_support/core_ext/module/remove_method" module ActionView diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index b7dbb38369..ce5493c01b 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -1,7 +1,7 @@ require "concurrent/map" require "active_support/core_ext/module/remove_method" require "active_support/core_ext/module/attribute_accessors" -require "action_view/template/resolver" +require_relative "template/resolver" module ActionView # = Action View Lookup Context diff --git a/actionview/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb index 48bea315a9..6805513347 100644 --- a/actionview/lib/action_view/record_identifier.rb +++ b/actionview/lib/action_view/record_identifier.rb @@ -1,5 +1,5 @@ require "active_support/core_ext/module" -require "action_view/model_naming" +require_relative "model_naming" module ActionView # RecordIdentifier encapsulates methods used by various ActionView helpers diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 1f8f997a2d..77f5084686 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -1,5 +1,5 @@ require "concurrent/map" -require "action_view/renderer/partial_renderer/collection_caching" +require_relative "partial_renderer/collection_caching" module ActionView class PartialIteration diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index cf18562c45..9bee76a1f7 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -1,4 +1,4 @@ -require "action_view/view_paths" +require_relative "view_paths" module ActionView # This is a class to fix I18n global state. Whenever you provide I18n.locale during a request, diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 75ea4d31f5..df2cd568a2 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -1,7 +1,7 @@ require "pathname" require "active_support/core_ext/class" require "active_support/core_ext/module/attribute_accessors" -require "action_view/template" +require_relative "../template" require "thread" require "concurrent/map" diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 3188526b63..f00847b64d 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -1,4 +1,4 @@ -require "action_view/template/resolver" +require_relative "../template/resolver" module ActionView #:nodoc: # Use FixtureResolver in your tests to simulate the presence of files on the -- cgit v1.2.3 From 87b3e226d65ac1ed371620bfdcd2f950c87cfece Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sun, 2 Jul 2017 02:15:17 +0930 Subject: Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. --- actionview/lib/action_view.rb | 1 - actionview/lib/action_view/base.rb | 1 - actionview/lib/action_view/buffers.rb | 1 - actionview/lib/action_view/context.rb | 1 - actionview/lib/action_view/dependency_tracker.rb | 1 - actionview/lib/action_view/digestor.rb | 1 - actionview/lib/action_view/flows.rb | 1 - actionview/lib/action_view/gem_version.rb | 1 - actionview/lib/action_view/helpers.rb | 1 - actionview/lib/action_view/helpers/active_model_helper.rb | 1 - actionview/lib/action_view/helpers/asset_tag_helper.rb | 1 - actionview/lib/action_view/helpers/asset_url_helper.rb | 1 - actionview/lib/action_view/helpers/atom_feed_helper.rb | 1 - actionview/lib/action_view/helpers/cache_helper.rb | 1 - actionview/lib/action_view/helpers/capture_helper.rb | 1 - actionview/lib/action_view/helpers/controller_helper.rb | 1 - actionview/lib/action_view/helpers/csrf_helper.rb | 1 - actionview/lib/action_view/helpers/date_helper.rb | 1 - actionview/lib/action_view/helpers/debug_helper.rb | 1 - actionview/lib/action_view/helpers/form_helper.rb | 1 - actionview/lib/action_view/helpers/form_options_helper.rb | 1 - actionview/lib/action_view/helpers/form_tag_helper.rb | 1 - actionview/lib/action_view/helpers/javascript_helper.rb | 1 - actionview/lib/action_view/helpers/number_helper.rb | 1 - actionview/lib/action_view/helpers/output_safety_helper.rb | 1 - actionview/lib/action_view/helpers/record_tag_helper.rb | 1 - actionview/lib/action_view/helpers/rendering_helper.rb | 1 - actionview/lib/action_view/helpers/sanitize_helper.rb | 1 - actionview/lib/action_view/helpers/tag_helper.rb | 2 +- actionview/lib/action_view/helpers/tags.rb | 1 - actionview/lib/action_view/helpers/tags/base.rb | 1 - actionview/lib/action_view/helpers/tags/check_box.rb | 1 - actionview/lib/action_view/helpers/tags/checkable.rb | 1 - actionview/lib/action_view/helpers/tags/collection_check_boxes.rb | 1 - actionview/lib/action_view/helpers/tags/collection_helpers.rb | 1 - actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb | 1 - actionview/lib/action_view/helpers/tags/collection_select.rb | 1 - actionview/lib/action_view/helpers/tags/color_field.rb | 1 - actionview/lib/action_view/helpers/tags/date_field.rb | 1 - actionview/lib/action_view/helpers/tags/date_select.rb | 1 - actionview/lib/action_view/helpers/tags/datetime_field.rb | 1 - actionview/lib/action_view/helpers/tags/datetime_local_field.rb | 1 - actionview/lib/action_view/helpers/tags/datetime_select.rb | 1 - actionview/lib/action_view/helpers/tags/email_field.rb | 1 - actionview/lib/action_view/helpers/tags/file_field.rb | 1 - actionview/lib/action_view/helpers/tags/grouped_collection_select.rb | 1 - actionview/lib/action_view/helpers/tags/hidden_field.rb | 1 - actionview/lib/action_view/helpers/tags/label.rb | 1 - actionview/lib/action_view/helpers/tags/month_field.rb | 1 - actionview/lib/action_view/helpers/tags/number_field.rb | 1 - actionview/lib/action_view/helpers/tags/password_field.rb | 1 - actionview/lib/action_view/helpers/tags/placeholderable.rb | 1 - actionview/lib/action_view/helpers/tags/radio_button.rb | 1 - actionview/lib/action_view/helpers/tags/range_field.rb | 1 - actionview/lib/action_view/helpers/tags/search_field.rb | 1 - actionview/lib/action_view/helpers/tags/select.rb | 1 - actionview/lib/action_view/helpers/tags/tel_field.rb | 1 - actionview/lib/action_view/helpers/tags/text_area.rb | 1 - actionview/lib/action_view/helpers/tags/text_field.rb | 1 - actionview/lib/action_view/helpers/tags/time_field.rb | 1 - actionview/lib/action_view/helpers/tags/time_select.rb | 1 - actionview/lib/action_view/helpers/tags/time_zone_select.rb | 1 - actionview/lib/action_view/helpers/tags/translator.rb | 1 - actionview/lib/action_view/helpers/tags/url_field.rb | 1 - actionview/lib/action_view/helpers/tags/week_field.rb | 1 - actionview/lib/action_view/helpers/text_helper.rb | 1 - actionview/lib/action_view/helpers/translation_helper.rb | 1 - actionview/lib/action_view/helpers/url_helper.rb | 1 - actionview/lib/action_view/layouts.rb | 1 - actionview/lib/action_view/log_subscriber.rb | 1 - actionview/lib/action_view/lookup_context.rb | 1 - actionview/lib/action_view/model_naming.rb | 1 - actionview/lib/action_view/path_set.rb | 1 - actionview/lib/action_view/railtie.rb | 1 - actionview/lib/action_view/record_identifier.rb | 1 - actionview/lib/action_view/renderer/abstract_renderer.rb | 1 - actionview/lib/action_view/renderer/partial_renderer.rb | 1 - .../lib/action_view/renderer/partial_renderer/collection_caching.rb | 1 - actionview/lib/action_view/renderer/renderer.rb | 1 - actionview/lib/action_view/renderer/streaming_template_renderer.rb | 1 - actionview/lib/action_view/renderer/template_renderer.rb | 1 - actionview/lib/action_view/rendering.rb | 1 - actionview/lib/action_view/routing_url_for.rb | 1 - actionview/lib/action_view/tasks/cache_digests.rake | 1 - actionview/lib/action_view/template.rb | 1 - actionview/lib/action_view/template/error.rb | 1 - actionview/lib/action_view/template/handlers.rb | 1 - actionview/lib/action_view/template/handlers/builder.rb | 1 - actionview/lib/action_view/template/handlers/erb.rb | 1 - actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb | 1 - actionview/lib/action_view/template/handlers/erb/erubi.rb | 1 - actionview/lib/action_view/template/handlers/erb/erubis.rb | 1 - actionview/lib/action_view/template/handlers/html.rb | 1 - actionview/lib/action_view/template/handlers/raw.rb | 1 - actionview/lib/action_view/template/html.rb | 1 - actionview/lib/action_view/template/resolver.rb | 1 - actionview/lib/action_view/template/text.rb | 1 - actionview/lib/action_view/template/types.rb | 1 - actionview/lib/action_view/test_case.rb | 1 - actionview/lib/action_view/testing/resolvers.rb | 1 - actionview/lib/action_view/version.rb | 1 - actionview/lib/action_view/view_paths.rb | 1 - 102 files changed, 1 insertion(+), 102 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view.rb b/actionview/lib/action_view.rb index c125651a64..99c5b831b5 100644 --- a/actionview/lib/action_view.rb +++ b/actionview/lib/action_view.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true #-- # Copyright (c) 2004-2017 David Heinemeier Hansson # diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 51f8202de4..1808553239 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" require "active_support/core_ext/module/attribute_accessors" require "active_support/ordered_options" diff --git a/actionview/lib/action_view/buffers.rb b/actionview/lib/action_view/buffers.rb index 824995582b..089daa6d60 100644 --- a/actionview/lib/action_view/buffers.rb +++ b/actionview/lib/action_view/buffers.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/context.rb b/actionview/lib/action_view/context.rb index 3a24a7692e..31aa73a0cf 100644 --- a/actionview/lib/action_view/context.rb +++ b/actionview/lib/action_view/context.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module CompiledTemplates #:nodoc: # holds compiled template code diff --git a/actionview/lib/action_view/dependency_tracker.rb b/actionview/lib/action_view/dependency_tracker.rb index 9128494501..451eeec9d6 100644 --- a/actionview/lib/action_view/dependency_tracker.rb +++ b/actionview/lib/action_view/dependency_tracker.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "concurrent/map" require "action_view/path_set" diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 9a5e11699c..5ddf1ceb66 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "concurrent/map" require "action_view/dependency_tracker" require "monitor" diff --git a/actionview/lib/action_view/flows.rb b/actionview/lib/action_view/flows.rb index d933f05456..6d5f57a570 100644 --- a/actionview/lib/action_view/flows.rb +++ b/actionview/lib/action_view/flows.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/gem_version.rb b/actionview/lib/action_view/gem_version.rb index 44425b4aa3..92e21d7a4f 100644 --- a/actionview/lib/action_view/gem_version.rb +++ b/actionview/lib/action_view/gem_version.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView # Returns the version of the currently loaded Action View as a Gem::Version def self.gem_version diff --git a/actionview/lib/action_view/helpers.rb b/actionview/lib/action_view/helpers.rb index b98041252c..c1b4b4f84b 100644 --- a/actionview/lib/action_view/helpers.rb +++ b/actionview/lib/action_view/helpers.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/benchmarkable" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/helpers/active_model_helper.rb b/actionview/lib/action_view/helpers/active_model_helper.rb index ba3b5801c9..4bb5788a16 100644 --- a/actionview/lib/action_view/helpers/active_model_helper.rb +++ b/actionview/lib/action_view/helpers/active_model_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ext/enumerable" diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index cfb6579f67..3a854e82d3 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/hash/keys" require "action_view/helpers/asset_url_helper" diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb index f9f12fdba5..03bd1eb008 100644 --- a/actionview/lib/action_view/helpers/asset_url_helper.rb +++ b/actionview/lib/action_view/helpers/asset_url_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "zlib" module ActionView diff --git a/actionview/lib/action_view/helpers/atom_feed_helper.rb b/actionview/lib/action_view/helpers/atom_feed_helper.rb index a4ec1f9388..3538515aee 100644 --- a/actionview/lib/action_view/helpers/atom_feed_helper.rb +++ b/actionview/lib/action_view/helpers/atom_feed_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "set" module ActionView diff --git a/actionview/lib/action_view/helpers/cache_helper.rb b/actionview/lib/action_view/helpers/cache_helper.rb index 101fe86e9f..b7c7324f31 100644 --- a/actionview/lib/action_view/helpers/cache_helper.rb +++ b/actionview/lib/action_view/helpers/cache_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView # = Action View Cache Helper module Helpers diff --git a/actionview/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb index 0865ac0a7e..719592b5c5 100644 --- a/actionview/lib/action_view/helpers/capture_helper.rb +++ b/actionview/lib/action_view/helpers/capture_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView diff --git a/actionview/lib/action_view/helpers/controller_helper.rb b/actionview/lib/action_view/helpers/controller_helper.rb index 0991fc16e0..e86cdca4e4 100644 --- a/actionview/lib/action_view/helpers/controller_helper.rb +++ b/actionview/lib/action_view/helpers/controller_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" module ActionView diff --git a/actionview/lib/action_view/helpers/csrf_helper.rb b/actionview/lib/action_view/helpers/csrf_helper.rb index f560445b83..2a15d2aa5a 100644 --- a/actionview/lib/action_view/helpers/csrf_helper.rb +++ b/actionview/lib/action_view/helpers/csrf_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView # = Action View CSRF Helper module Helpers diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 552d9cfeab..d28eec88a1 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "date" require "action_view/helpers/tag_helper" require "active_support/core_ext/array/extract_options" diff --git a/actionview/lib/action_view/helpers/debug_helper.rb b/actionview/lib/action_view/helpers/debug_helper.rb index 26c97ab2bf..f61ca2c9c2 100644 --- a/actionview/lib/action_view/helpers/debug_helper.rb +++ b/actionview/lib/action_view/helpers/debug_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView # = Action View Debug Helper # diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index 4a1e6ae9bd..4b2561e53d 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "cgi" require "action_view/helpers/date_helper" require "action_view/helpers/tag_helper" diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb index 7d0fbce34e..07d4310a4e 100644 --- a/actionview/lib/action_view/helpers/form_options_helper.rb +++ b/actionview/lib/action_view/helpers/form_options_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "cgi" require "erb" require "action_view/helpers/form_helper" diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 8225fa1e38..9fc08b3837 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "cgi" require "action_view/helpers/tag_helper" require "active_support/core_ext/string/output_safety" diff --git a/actionview/lib/action_view/helpers/javascript_helper.rb b/actionview/lib/action_view/helpers/javascript_helper.rb index 6dfbdcac40..6ba70ec081 100644 --- a/actionview/lib/action_view/helpers/javascript_helper.rb +++ b/actionview/lib/action_view/helpers/javascript_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tag_helper" module ActionView diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb index e40041cb74..b6bc5f4f6f 100644 --- a/actionview/lib/action_view/helpers/number_helper.rb +++ b/actionview/lib/action_view/helpers/number_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/output_safety" require "active_support/number_helper" diff --git a/actionview/lib/action_view/helpers/output_safety_helper.rb b/actionview/lib/action_view/helpers/output_safety_helper.rb index 71e5862698..25defd1276 100644 --- a/actionview/lib/action_view/helpers/output_safety_helper.rb +++ b/actionview/lib/action_view/helpers/output_safety_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/helpers/record_tag_helper.rb b/actionview/lib/action_view/helpers/record_tag_helper.rb index 7aca005d46..f7ee573035 100644 --- a/actionview/lib/action_view/helpers/record_tag_helper.rb +++ b/actionview/lib/action_view/helpers/record_tag_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module RecordTagHelper diff --git a/actionview/lib/action_view/helpers/rendering_helper.rb b/actionview/lib/action_view/helpers/rendering_helper.rb index ffb5627805..7d7f2393ff 100644 --- a/actionview/lib/action_view/helpers/rendering_helper.rb +++ b/actionview/lib/action_view/helpers/rendering_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers # = Action View Rendering diff --git a/actionview/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb index b7757086c3..0abd5bc5dc 100644 --- a/actionview/lib/action_view/helpers/sanitize_helper.rb +++ b/actionview/lib/action_view/helpers/sanitize_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/object/try" require "rails-html-sanitizer" diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index a64d7e396e..306b71c85e 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: true +# frozen-string-literal: true require "active_support/core_ext/string/output_safety" require "set" diff --git a/actionview/lib/action_view/helpers/tags.rb b/actionview/lib/action_view/helpers/tags.rb index ec06617891..a4f6eb0150 100644 --- a/actionview/lib/action_view/helpers/tags.rb +++ b/actionview/lib/action_view/helpers/tags.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags #:nodoc: diff --git a/actionview/lib/action_view/helpers/tags/base.rb b/actionview/lib/action_view/helpers/tags/base.rb index dec1c1f070..0895533a60 100644 --- a/actionview/lib/action_view/helpers/tags/base.rb +++ b/actionview/lib/action_view/helpers/tags/base.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/check_box.rb b/actionview/lib/action_view/helpers/tags/check_box.rb index 88da221eb2..02f87fc89f 100644 --- a/actionview/lib/action_view/helpers/tags/check_box.rb +++ b/actionview/lib/action_view/helpers/tags/check_box.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/checkable.rb b/actionview/lib/action_view/helpers/tags/checkable.rb index a3638aa3fa..052e9df662 100644 --- a/actionview/lib/action_view/helpers/tags/checkable.rb +++ b/actionview/lib/action_view/helpers/tags/checkable.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb index 1e9f6a1cee..e02b7bdb2e 100644 --- a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb +++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/collection_helpers.rb b/actionview/lib/action_view/helpers/tags/collection_helpers.rb index 7f0296e466..75d237eb35 100644 --- a/actionview/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index 85648991d7..f085a5fb73 100644 --- a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/collection_select.rb b/actionview/lib/action_view/helpers/tags/collection_select.rb index c6a81cf795..4365c714eb 100644 --- a/actionview/lib/action_view/helpers/tags/collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/collection_select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/color_field.rb b/actionview/lib/action_view/helpers/tags/color_field.rb index c133fcab77..b4bbe92746 100644 --- a/actionview/lib/action_view/helpers/tags/color_field.rb +++ b/actionview/lib/action_view/helpers/tags/color_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/date_field.rb b/actionview/lib/action_view/helpers/tags/date_field.rb index 2043a05689..c22be0db29 100644 --- a/actionview/lib/action_view/helpers/tags/date_field.rb +++ b/actionview/lib/action_view/helpers/tags/date_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/date_select.rb b/actionview/lib/action_view/helpers/tags/date_select.rb index fdfcad7e48..638c134deb 100644 --- a/actionview/lib/action_view/helpers/tags/date_select.rb +++ b/actionview/lib/action_view/helpers/tags/date_select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/time/calculations" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/datetime_field.rb b/actionview/lib/action_view/helpers/tags/datetime_field.rb index 4686606806..b3940c7e44 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/datetime_local_field.rb b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb index ba0c7fa5f7..b4a74185d1 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_local_field.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_local_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/datetime_select.rb b/actionview/lib/action_view/helpers/tags/datetime_select.rb index 3a36e47714..563de1840e 100644 --- a/actionview/lib/action_view/helpers/tags/datetime_select.rb +++ b/actionview/lib/action_view/helpers/tags/datetime_select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/email_field.rb b/actionview/lib/action_view/helpers/tags/email_field.rb index 4ba0905cfb..7ce3ccb9bf 100644 --- a/actionview/lib/action_view/helpers/tags/email_field.rb +++ b/actionview/lib/action_view/helpers/tags/email_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/file_field.rb b/actionview/lib/action_view/helpers/tags/file_field.rb index 201b7fffa5..476b820d84 100644 --- a/actionview/lib/action_view/helpers/tags/file_field.rb +++ b/actionview/lib/action_view/helpers/tags/file_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb index 1b3f993b32..20e312dd0f 100644 --- a/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb +++ b/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/hidden_field.rb b/actionview/lib/action_view/helpers/tags/hidden_field.rb index ca5cd395a2..c3757c2461 100644 --- a/actionview/lib/action_view/helpers/tags/hidden_field.rb +++ b/actionview/lib/action_view/helpers/tags/hidden_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/label.rb b/actionview/lib/action_view/helpers/tags/label.rb index 9f8dac4bbd..cab15ae201 100644 --- a/actionview/lib/action_view/helpers/tags/label.rb +++ b/actionview/lib/action_view/helpers/tags/label.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/month_field.rb b/actionview/lib/action_view/helpers/tags/month_field.rb index ed74ca3f35..4c0fb846ee 100644 --- a/actionview/lib/action_view/helpers/tags/month_field.rb +++ b/actionview/lib/action_view/helpers/tags/month_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/number_field.rb b/actionview/lib/action_view/helpers/tags/number_field.rb index fc5adfeab1..4f95b1b4de 100644 --- a/actionview/lib/action_view/helpers/tags/number_field.rb +++ b/actionview/lib/action_view/helpers/tags/number_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/password_field.rb b/actionview/lib/action_view/helpers/tags/password_field.rb index 008df0f817..444ef65074 100644 --- a/actionview/lib/action_view/helpers/tags/password_field.rb +++ b/actionview/lib/action_view/helpers/tags/password_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/placeholderable.rb b/actionview/lib/action_view/helpers/tags/placeholderable.rb index 5ae57cdeef..cf7b117614 100644 --- a/actionview/lib/action_view/helpers/tags/placeholderable.rb +++ b/actionview/lib/action_view/helpers/tags/placeholderable.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/radio_button.rb b/actionview/lib/action_view/helpers/tags/radio_button.rb index 538826f749..43dbd32083 100644 --- a/actionview/lib/action_view/helpers/tags/radio_button.rb +++ b/actionview/lib/action_view/helpers/tags/radio_button.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/range_field.rb b/actionview/lib/action_view/helpers/tags/range_field.rb index d7c11cc7a4..f98ae88043 100644 --- a/actionview/lib/action_view/helpers/tags/range_field.rb +++ b/actionview/lib/action_view/helpers/tags/range_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/search_field.rb b/actionview/lib/action_view/helpers/tags/search_field.rb index 38304d8d73..a848aeabfa 100644 --- a/actionview/lib/action_view/helpers/tags/search_field.rb +++ b/actionview/lib/action_view/helpers/tags/search_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb index 8c166d630f..380f7a8c4e 100644 --- a/actionview/lib/action_view/helpers/tags/select.rb +++ b/actionview/lib/action_view/helpers/tags/select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/tel_field.rb b/actionview/lib/action_view/helpers/tags/tel_field.rb index c95127a714..987bb9e67a 100644 --- a/actionview/lib/action_view/helpers/tags/tel_field.rb +++ b/actionview/lib/action_view/helpers/tags/tel_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/text_area.rb b/actionview/lib/action_view/helpers/tags/text_area.rb index 6bf3c0c02f..31e3a9e9b1 100644 --- a/actionview/lib/action_view/helpers/tags/text_area.rb +++ b/actionview/lib/action_view/helpers/tags/text_area.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/text_field.rb b/actionview/lib/action_view/helpers/tags/text_field.rb index 48930770be..613cade7b3 100644 --- a/actionview/lib/action_view/helpers/tags/text_field.rb +++ b/actionview/lib/action_view/helpers/tags/text_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView diff --git a/actionview/lib/action_view/helpers/tags/time_field.rb b/actionview/lib/action_view/helpers/tags/time_field.rb index 8c3f082359..0e90a3aed7 100644 --- a/actionview/lib/action_view/helpers/tags/time_field.rb +++ b/actionview/lib/action_view/helpers/tags/time_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/time_select.rb b/actionview/lib/action_view/helpers/tags/time_select.rb index d46728698f..0b06311d25 100644 --- a/actionview/lib/action_view/helpers/tags/time_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/time_zone_select.rb b/actionview/lib/action_view/helpers/tags/time_zone_select.rb index 49e099d38a..80d165ec7e 100644 --- a/actionview/lib/action_view/helpers/tags/time_zone_select.rb +++ b/actionview/lib/action_view/helpers/tags/time_zone_select.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/translator.rb b/actionview/lib/action_view/helpers/tags/translator.rb index 0d3ac24689..ced835eaa8 100644 --- a/actionview/lib/action_view/helpers/tags/translator.rb +++ b/actionview/lib/action_view/helpers/tags/translator.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/url_field.rb b/actionview/lib/action_view/helpers/tags/url_field.rb index 4c474a579f..d76340178d 100644 --- a/actionview/lib/action_view/helpers/tags/url_field.rb +++ b/actionview/lib/action_view/helpers/tags/url_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/tags/week_field.rb b/actionview/lib/action_view/helpers/tags/week_field.rb index 08c6fbb81d..835d1667d7 100644 --- a/actionview/lib/action_view/helpers/tags/week_field.rb +++ b/actionview/lib/action_view/helpers/tags/week_field.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index 4fce229276..bc922f9ce8 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/string/filters" require "active_support/core_ext/array/extract_options" diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index a28acdf1f6..24d1f34c5a 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/tag_helper" require "active_support/core_ext/string/access" require "i18n/exceptions" diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index 6bdb8e90ff..b78c367921 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/helpers/javascript_helper" require "active_support/core_ext/array/access" require "active_support/core_ext/hash/keys" diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index f5681668e5..ab8409e8d0 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/rendering" require "active_support/core_ext/module/remove_method" diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index deacf2d001..613be2b877 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/log_subscriber" module ActionView diff --git a/actionview/lib/action_view/lookup_context.rb b/actionview/lib/action_view/lookup_context.rb index 0220ac3a42..b7dbb38369 100644 --- a/actionview/lib/action_view/lookup_context.rb +++ b/actionview/lib/action_view/lookup_context.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "concurrent/map" require "active_support/core_ext/module/remove_method" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/model_naming.rb b/actionview/lib/action_view/model_naming.rb index 5eab00cd1a..b6ed13424e 100644 --- a/actionview/lib/action_view/model_naming.rb +++ b/actionview/lib/action_view/model_naming.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module ModelNaming #:nodoc: # Converts the given object to an ActiveModel compliant one. diff --git a/actionview/lib/action_view/path_set.rb b/actionview/lib/action_view/path_set.rb index 0ac5778273..6688519ffd 100644 --- a/actionview/lib/action_view/path_set.rb +++ b/actionview/lib/action_view/path_set.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView #:nodoc: # = Action View PathSet # diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 3971dc0aed..61678933e9 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view" require "rails" diff --git a/actionview/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb index 885f935248..48bea315a9 100644 --- a/actionview/lib/action_view/record_identifier.rb +++ b/actionview/lib/action_view/record_identifier.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/module" require "action_view/model_naming" diff --git a/actionview/lib/action_view/renderer/abstract_renderer.rb b/actionview/lib/action_view/renderer/abstract_renderer.rb index 217b05b5f3..0b315eb569 100644 --- a/actionview/lib/action_view/renderer/abstract_renderer.rb +++ b/actionview/lib/action_view/renderer/abstract_renderer.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView # This class defines the interface for a renderer. Each class that # subclasses +AbstractRenderer+ is used by the base +Renderer+ class to diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 0bc414677f..1f8f997a2d 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "concurrent/map" require "action_view/renderer/partial_renderer/collection_caching" diff --git a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb index 61cb6c90b9..32663fb80d 100644 --- a/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb +++ b/actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module CollectionCaching # :nodoc: extend ActiveSupport::Concern diff --git a/actionview/lib/action_view/renderer/renderer.rb b/actionview/lib/action_view/renderer/renderer.rb index 07461d3e2e..bcdeb85d30 100644 --- a/actionview/lib/action_view/renderer/renderer.rb +++ b/actionview/lib/action_view/renderer/renderer.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView # This is the main entry point for rendering. It basically delegates # to other objects like TemplateRenderer and PartialRenderer which diff --git a/actionview/lib/action_view/renderer/streaming_template_renderer.rb b/actionview/lib/action_view/renderer/streaming_template_renderer.rb index 40d7ce63a6..62ce985243 100644 --- a/actionview/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionview/lib/action_view/renderer/streaming_template_renderer.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "fiber" module ActionView diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 1fe95a5f67..54317199de 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/object/try" module ActionView diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index 29cdbf37cb..cf18562c45 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/view_paths" module ActionView diff --git a/actionview/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb index 3f6b59cf98..687ba7c1b4 100644 --- a/actionview/lib/action_view/routing_url_for.rb +++ b/actionview/lib/action_view/routing_url_for.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_dispatch/routing/polymorphic_routes" module ActionView diff --git a/actionview/lib/action_view/tasks/cache_digests.rake b/actionview/lib/action_view/tasks/cache_digests.rake index 929bace6d4..d30b3f7797 100644 --- a/actionview/lib/action_view/tasks/cache_digests.rake +++ b/actionview/lib/action_view/tasks/cache_digests.rake @@ -1,4 +1,3 @@ -# frozen_string_literal: true namespace :cache_digests do desc "Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)" task nested_dependencies: :environment do diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 80b294dc3d..3f2546664e 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/object/try" require "active_support/core_ext/kernel/singleton_class" require "thread" diff --git a/actionview/lib/action_view/template/error.rb b/actionview/lib/action_view/template/error.rb index c2f13eb77c..cc90477190 100644 --- a/actionview/lib/action_view/template/error.rb +++ b/actionview/lib/action_view/template/error.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/enumerable" module ActionView diff --git a/actionview/lib/action_view/template/handlers.rb b/actionview/lib/action_view/template/handlers.rb index d5300ea659..f4301f6f07 100644 --- a/actionview/lib/action_view/template/handlers.rb +++ b/actionview/lib/action_view/template/handlers.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView #:nodoc: # = Action View Template Handlers class Template diff --git a/actionview/lib/action_view/template/handlers/builder.rb b/actionview/lib/action_view/template/handlers/builder.rb index f8f5b96704..67ad78133d 100644 --- a/actionview/lib/action_view/template/handlers/builder.rb +++ b/actionview/lib/action_view/template/handlers/builder.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Template::Handlers class Builder diff --git a/actionview/lib/action_view/template/handlers/erb.rb b/actionview/lib/action_view/template/handlers/erb.rb index fc2a901fa9..48c2e22a89 100644 --- a/actionview/lib/action_view/template/handlers/erb.rb +++ b/actionview/lib/action_view/template/handlers/erb.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView class Template module Handlers diff --git a/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb b/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb index 59d6018f93..427ea20064 100644 --- a/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb +++ b/actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true ::ActiveSupport::Deprecation.warn("ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead.") module ActionView diff --git a/actionview/lib/action_view/template/handlers/erb/erubi.rb b/actionview/lib/action_view/template/handlers/erb/erubi.rb index 85750d57ca..755cc84015 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubi.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubi.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "erubi" module ActionView diff --git a/actionview/lib/action_view/template/handlers/erb/erubis.rb b/actionview/lib/action_view/template/handlers/erb/erubis.rb index 43a3731f8b..f3c35e1aec 100644 --- a/actionview/lib/action_view/template/handlers/erb/erubis.rb +++ b/actionview/lib/action_view/template/handlers/erb/erubis.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true gem "erubis" require "erubis" diff --git a/actionview/lib/action_view/template/handlers/html.rb b/actionview/lib/action_view/template/handlers/html.rb index 215de5cfa2..ccaa8d1469 100644 --- a/actionview/lib/action_view/template/handlers/html.rb +++ b/actionview/lib/action_view/template/handlers/html.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Template::Handlers class Html < Raw diff --git a/actionview/lib/action_view/template/handlers/raw.rb b/actionview/lib/action_view/template/handlers/raw.rb index 6fc46aaa93..e7519e94f9 100644 --- a/actionview/lib/action_view/template/handlers/raw.rb +++ b/actionview/lib/action_view/template/handlers/raw.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module Template::Handlers class Raw diff --git a/actionview/lib/action_view/template/html.rb b/actionview/lib/action_view/template/html.rb index e2d2d05ec7..0ffae10432 100644 --- a/actionview/lib/action_view/template/html.rb +++ b/actionview/lib/action_view/template/html.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView #:nodoc: # = Action View HTML Template class Template diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 837396bdfd..65f8be26a0 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "pathname" require "active_support/core_ext/class" require "active_support/core_ext/module/attribute_accessors" diff --git a/actionview/lib/action_view/template/text.rb b/actionview/lib/action_view/template/text.rb index 8249b27aa0..380528d6ef 100644 --- a/actionview/lib/action_view/template/text.rb +++ b/actionview/lib/action_view/template/text.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView #:nodoc: # = Action View Text Template class Template diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index 6f00fd0a3b..21959a3798 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module ActionView diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 0df1314395..424a86ba3e 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "active_support/core_ext/module/remove_method" require "action_controller" require "action_controller/test_case" diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index acd5dc4cb4..b2d3e10690 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require "action_view/template/resolver" module ActionView #:nodoc: diff --git a/actionview/lib/action_view/version.rb b/actionview/lib/action_view/version.rb index 3d4e517f99..315404864d 100644 --- a/actionview/lib/action_view/version.rb +++ b/actionview/lib/action_view/version.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true require_relative "gem_version" module ActionView diff --git a/actionview/lib/action_view/view_paths.rb b/actionview/lib/action_view/view_paths.rb index bbff56f88d..938f0fc17f 100644 --- a/actionview/lib/action_view/view_paths.rb +++ b/actionview/lib/action_view/view_paths.rb @@ -1,4 +1,3 @@ -# frozen_string_literal: true module ActionView module ViewPaths extend ActiveSupport::Concern -- cgit v1.2.3 From 310918f6a194bf5752fe1025930881756f5d8a8e Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sun, 2 Jul 2017 02:18:22 +0930 Subject: Avoid shadowed variable --- actionview/lib/action_view/helpers/asset_tag_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index 3a854e82d3..a8d37013f9 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -245,8 +245,8 @@ module ActionView end if options[:srcset] && !options[:srcset].is_a?(String) - options[:srcset] = options[:srcset].map do |src, size| - src_path = path_to_image(src, skip_pipeline: skip_pipeline) + options[:srcset] = options[:srcset].map do |src_path, size| + src_path = path_to_image(src_path, skip_pipeline: skip_pipeline) "#{src_path} #{size}" end.join(", ") end -- cgit v1.2.3 From b3f3d49fd6b91c6573b3e10e3d00f65306638927 Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Sat, 1 Jul 2017 23:09:13 +0300 Subject: Prepare AP and AR to be frozen string friendly --- actionview/lib/action_view/log_subscriber.rb | 3 ++- actionview/lib/action_view/template.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/log_subscriber.rb b/actionview/lib/action_view/log_subscriber.rb index 613be2b877..c8623f1e9f 100644 --- a/actionview/lib/action_view/log_subscriber.rb +++ b/actionview/lib/action_view/log_subscriber.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/log_subscriber" module ActionView @@ -83,7 +84,7 @@ module ActionView def log_rendering_start(payload) info do - message = " Rendering #{from_rails_root(payload[:identifier])}" + message = " Rendering #{from_rails_root(payload[:identifier])}".dup message << " within #{from_rails_root(payload[:layout])}" if payload[:layout] message end diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 3f2546664e..80b294dc3d 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_support/core_ext/object/try" require "active_support/core_ext/kernel/singleton_class" require "thread" -- cgit v1.2.3