From 2dcd79a1619ea8befc6ddeaf60c81cbb8265eacc Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 28 Sep 2015 21:15:54 +0900 Subject: [ci skip] Fix document of `ActionController::RequestForgeryProtection` * add `end` to end of class definition * add a blank line between explanation and example code --- actionpack/lib/action_controller/metal/request_forgery_protection.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index 5674eef67b..64f6f7cf51 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -90,8 +90,10 @@ module ActionController #:nodoc: # # class FooController < ApplicationController # protect_from_forgery except: :index + # end # # You can disable forgery protection on controller by skipping the verification before_action: + # # skip_before_action :verify_authenticity_token # # Valid Options: -- cgit v1.2.3 From dd5b083f5d828c4bb51c4c6c3dbadbdbaf22193a Mon Sep 17 00:00:00 2001 From: Ronak Jangir Date: Mon, 28 Sep 2015 20:15:53 +0530 Subject: =?UTF-8?q?Renamed=20=E2=80=98Return=E2=80=99=20to=20=E2=80=98Retu?= =?UTF-8?q?rns=E2=80=99=20[ci=20skip]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actionpack/lib/action_controller/metal/strong_parameters.rb | 2 +- actionpack/lib/action_dispatch/http/filter_parameters.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 903dba3eb4..130ba61786 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -540,7 +540,7 @@ module ActionController end alias_method :delete_if, :reject! - # Return values that were assigned to the given +keys+. Note that all the + # Returns values that were assigned to the given +keys+. Note that all the # +Hash+ objects will be converted to ActionController::Parameters. def values_at(*keys) convert_value_to_parameters(@parameters.values_at(*keys)) diff --git a/actionpack/lib/action_dispatch/http/filter_parameters.rb b/actionpack/lib/action_dispatch/http/filter_parameters.rb index 9c0f39f2e7..9dcab79c3a 100644 --- a/actionpack/lib/action_dispatch/http/filter_parameters.rb +++ b/actionpack/lib/action_dispatch/http/filter_parameters.rb @@ -30,12 +30,12 @@ module ActionDispatch @filtered_path = nil end - # Return a hash of parameters with all sensitive data replaced. + # Returns a hash of parameters with all sensitive data replaced. def filtered_parameters @filtered_parameters ||= parameter_filter.filter(parameters) end - # Return a hash of request.env with all sensitive data replaced. + # Returns a hash of request.env with all sensitive data replaced. def filtered_env @filtered_env ||= env_filter.filter(@env) end -- cgit v1.2.3 From 4147ab730e807f622e5260a5f876749ff41fef26 Mon Sep 17 00:00:00 2001 From: Gaurav Sharma Date: Sat, 22 Aug 2015 03:12:06 +0530 Subject: proper raise ArgumentError, divided large text new line --- actionpack/lib/abstract_controller/url_for.rb | 2 +- actionpack/lib/action_dispatch/http/mime_negotiation.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/abstract_controller/url_for.rb b/actionpack/lib/abstract_controller/url_for.rb index 72d07b0927..5f22b45251 100644 --- a/actionpack/lib/abstract_controller/url_for.rb +++ b/actionpack/lib/abstract_controller/url_for.rb @@ -10,7 +10,7 @@ module AbstractController include ActionDispatch::Routing::UrlFor def _routes - raise "In order to use #url_for, you must include routing helpers explicitly. " \ + raise "In order to use #url_for, you must include routing helpers explicitly.\n" \ "For instance, `include Rails.application.routes.url_helpers`." end diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb index cab60a508a..7a99bc235c 100644 --- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb +++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb @@ -81,9 +81,9 @@ module ActionDispatch if variant.all? { |v| v.is_a?(Symbol) } @variant = ActiveSupport::ArrayInquirer.new(variant) else - raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols. " \ - "For security reasons, never directly set the variant to a user-provided value, " \ - "like params[:variant].to_sym. Check user-provided value against a whitelist first, " \ + raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols.\n" \ + "For security reasons, never directly set the variant to a user-provided value,\n" \ + "like params[:variant].to_sym. Check user-provided value against a whitelist first,\n" \ "then set the variant: request.variant = :tablet if params[:variant] == 'tablet'" end end -- cgit v1.2.3 From b0ce1415fbe65ade1cfa9154d4f3faf748b5f841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 28 Sep 2015 17:45:53 -0300 Subject: Revert "proper raise ArgumentError, divided large text new line" This reverts commit 4147ab730e807f622e5260a5f876749ff41fef26. --- actionpack/lib/abstract_controller/url_for.rb | 2 +- actionpack/lib/action_dispatch/http/mime_negotiation.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/abstract_controller/url_for.rb b/actionpack/lib/abstract_controller/url_for.rb index 5f22b45251..72d07b0927 100644 --- a/actionpack/lib/abstract_controller/url_for.rb +++ b/actionpack/lib/abstract_controller/url_for.rb @@ -10,7 +10,7 @@ module AbstractController include ActionDispatch::Routing::UrlFor def _routes - raise "In order to use #url_for, you must include routing helpers explicitly.\n" \ + raise "In order to use #url_for, you must include routing helpers explicitly. " \ "For instance, `include Rails.application.routes.url_helpers`." end diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb index 7a99bc235c..cab60a508a 100644 --- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb +++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb @@ -81,9 +81,9 @@ module ActionDispatch if variant.all? { |v| v.is_a?(Symbol) } @variant = ActiveSupport::ArrayInquirer.new(variant) else - raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols.\n" \ - "For security reasons, never directly set the variant to a user-provided value,\n" \ - "like params[:variant].to_sym. Check user-provided value against a whitelist first,\n" \ + raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols. " \ + "For security reasons, never directly set the variant to a user-provided value, " \ + "like params[:variant].to_sym. Check user-provided value against a whitelist first, " \ "then set the variant: request.variant = :tablet if params[:variant] == 'tablet'" end end -- cgit v1.2.3