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(-) 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