diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-09-14 17:57:52 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-09-14 18:26:32 +0900 |
commit | 3464cd5c288323ca115a4929d1e6b435c4afc8d4 (patch) | |
tree | ad2e1380ede0a1789c7c1a7bffb1f43b465c4105 /actionview | |
parent | 92703a9ea5d8b96f30e0b706b801c9185ef14f0e (diff) | |
download | rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.tar.gz rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.tar.bz2 rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.zip |
Fix broken comments indentation caused by rubocop auto-correct [ci skip]
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But comments was still kept absolute position. This commit aligns
comments with method definitions for consistency.
Diffstat (limited to 'actionview')
11 files changed, 49 insertions, 49 deletions
diff --git a/actionview/lib/action_view/helpers/tags/collection_helpers.rb b/actionview/lib/action_view/helpers/tags/collection_helpers.rb index 70d7c484eb..36575b2fd0 100644 --- a/actionview/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionview/lib/action_view/helpers/tags/collection_helpers.rb @@ -41,8 +41,8 @@ module ActionView sanitize_attribute_name(value), text, value, html_options) end - # Generate default options for collection helpers, such as :checked and - # :disabled. + # Generate default options for collection helpers, such as :checked and + # :disabled. def default_html_options_for_collection(item, value) #:nodoc: html_options = @html_options.dup diff --git a/actionview/lib/action_view/helpers/tags/select.rb b/actionview/lib/action_view/helpers/tags/select.rb index 8cc34e3180..667c7e945a 100644 --- a/actionview/lib/action_view/helpers/tags/select.rb +++ b/actionview/lib/action_view/helpers/tags/select.rb @@ -28,10 +28,10 @@ module ActionView private - # Grouped choices look like this: - # - # [nil, []] - # { nil => [] } + # Grouped choices look like this: + # + # [nil, []] + # { nil => [] } def grouped_choices? !@choices.empty? && @choices.first.respond_to?(:last) && Array === @choices.first.last end diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index dd5f6e7300..344893f41a 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -224,12 +224,12 @@ module ActionView module LayoutConditions # :nodoc: private - # Determines whether the current action has a layout definition by - # checking the action name against the :only and :except conditions - # set by the <tt>layout</tt> method. - # - # ==== Returns - # * <tt>Boolean</tt> - True if the action has a layout definition, false otherwise. + # Determines whether the current action has a layout definition by + # checking the action name against the :only and :except conditions + # set by the <tt>layout</tt> method. + # + # ==== Returns + # * <tt>Boolean</tt> - True if the action has a layout definition, false otherwise. def _conditional_layout? return unless super @@ -334,11 +334,11 @@ module ActionView private - # If no layout is supplied, look for a template named the return - # value of this method. - # - # ==== Returns - # * <tt>String</tt> - A template name + # If no layout is supplied, look for a template named the return + # value of this method. + # + # ==== Returns + # * <tt>String</tt> - A template name def _implied_layout_name # :nodoc: controller_path end diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index 4b6aecd187..dfe38c488f 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -350,13 +350,13 @@ module ActionView end end - # Sets up instance variables needed for rendering a partial. This method - # finds the options and details and extracts them. The method also contains - # logic that handles the type of object passed in as the partial. - # - # If +options[:partial]+ is a string, then the +@path+ instance variable is - # set to that string. Otherwise, the +options[:partial]+ object must - # respond to +to_partial_path+ in order to setup the path. + # Sets up instance variables needed for rendering a partial. This method + # finds the options and details and extracts them. The method also contains + # logic that handles the type of object passed in as the partial. + # + # If +options[:partial]+ is a string, then the +@path+ instance variable is + # set to that string. Otherwise, the +options[:partial]+ object must + # respond to +to_partial_path+ in order to setup the path. def setup(context, options, block) @view = context @options = options @@ -466,13 +466,13 @@ module ActionView end end - # Obtains the path to where the object's partial is located. If the object - # responds to +to_partial_path+, then +to_partial_path+ will be called and - # will provide the path. If the object does not respond to +to_partial_path+, - # then an +ArgumentError+ is raised. - # - # If +prefix_partial_path_with_controller_namespace+ is true, then this - # method will prefix the partial paths with a namespace. + # Obtains the path to where the object's partial is located. If the object + # responds to +to_partial_path+, then +to_partial_path+ will be called and + # will provide the path. If the object does not respond to +to_partial_path+, + # then an +ArgumentError+ is raised. + # + # If +prefix_partial_path_with_controller_namespace+ is true, then this + # method will prefix the partial paths with a namespace. def partial_path(object = @object) object = object.to_model if object.respond_to?(:to_model) diff --git a/actionview/lib/action_view/renderer/streaming_template_renderer.rb b/actionview/lib/action_view/renderer/streaming_template_renderer.rb index 0323ebef6a..2434250b2d 100644 --- a/actionview/lib/action_view/renderer/streaming_template_renderer.rb +++ b/actionview/lib/action_view/renderer/streaming_template_renderer.rb @@ -27,8 +27,8 @@ module ActionView private - # This is the same logging logic as in ShowExceptions middleware. - # TODO Once "exceptron" is in, refactor this piece to simply re-use exceptron. + # This is the same logging logic as in ShowExceptions middleware. + # TODO Once "exceptron" is in, refactor this piece to simply re-use exceptron. def log_error(exception) #:nodoc: logger = ActionView::Base.logger return unless logger diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 331a5ea228..4bcf009e27 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -16,7 +16,7 @@ module ActionView private - # Determine the template to be rendered using the given options. + # Determine the template to be rendered using the given options. def determine_template(options) keys = options.has_key?(:locals) ? options[:locals].keys : [] @@ -44,8 +44,8 @@ module ActionView end end - # Renders the given template. A string representing the layout can be - # supplied as well. + # Renders the given template. A string representing the layout can be + # supplied as well. def render_template(template, layout_name = nil, locals = nil) #:nodoc: view, locals = @view, locals || {} @@ -69,9 +69,9 @@ module ActionView end end - # This is the method which actually finds the layout using details in the lookup - # context object. If no layout is found, it checks if at least a layout with - # the given name exists across all details before raising the error. + # This is the method which actually finds the layout using details in the lookup + # context object. If no layout is found, it checks if at least a layout with + # the given name exists across all details before raising the error. def find_layout(layout, keys, formats) resolve_layout(layout, keys, formats) end diff --git a/actionview/lib/action_view/template/resolver.rb b/actionview/lib/action_view/template/resolver.rb index 20c2d5c782..5a2948d5a9 100644 --- a/actionview/lib/action_view/template/resolver.rb +++ b/actionview/lib/action_view/template/resolver.rb @@ -256,7 +256,7 @@ module ActionView filename.start_with?(path) end - # Helper for building query glob string based on resolver's pattern. + # Helper for building query glob string based on resolver's pattern. def build_query(path, details) query = @pattern.dup @@ -281,14 +281,14 @@ module ActionView entry.gsub(/[*?{}\[\]]/, '\\\\\\&'.freeze) end - # Returns the file mtime from the filesystem. + # Returns the file mtime from the filesystem. def mtime(p) File.mtime(p) end - # Extract handler, formats and variant from path. If a format cannot be found neither - # from the path, or the handler, we should return the array of formats given - # to the resolver. + # Extract handler, formats and variant from path. If a format cannot be found neither + # from the path, or the handler, we should return the array of formats given + # to the resolver. def extract_handler_and_format_and_variant(path, default_formats) pieces = File.basename(path).split(".".freeze) pieces.shift diff --git a/actionview/lib/action_view/view_paths.rb b/actionview/lib/action_view/view_paths.rb index 2ed62ca88f..b5cde5b43f 100644 --- a/actionview/lib/action_view/view_paths.rb +++ b/actionview/lib/action_view/view_paths.rb @@ -22,8 +22,8 @@ module ActionView private - # Override this method in your controller if you want to change paths prefixes for finding views. - # Prefixes defined here will still be added to parents' <tt>._prefixes</tt>. + # Override this method in your controller if you want to change paths prefixes for finding views. + # Prefixes defined here will still be added to parents' <tt>._prefixes</tt>. def local_prefixes [controller_path] end diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb index 3bb8d21e86..88c7189d22 100644 --- a/actionview/test/abstract_unit.rb +++ b/actionview/test/abstract_unit.rb @@ -264,7 +264,7 @@ module ActionDispatch class DebugExceptions private remove_method :stderr_logger - # Silence logger + # Silence logger def stderr_logger nil end diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb index 863efd15fa..a2cd3deb58 100644 --- a/actionview/test/actionpack/abstract/abstract_controller_test.rb +++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb @@ -227,7 +227,7 @@ module AbstractController end class ActionMissingRespondToActionController < AbstractController::Base - # No actions + # No actions private def action_missing(action_name) self.response_body = "success" diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index 952ed72aa9..8495949975 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -598,7 +598,7 @@ class PolymorphicRoutesTest < ActionController::TestCase end end - # Tests for uncountable names + # Tests for uncountable names def test_uncountable_resource with_test_routes do @series.save |