From 55f9b8129a50206513264824abb44088230793c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 16 Aug 2016 04:30:11 -0300 Subject: Add three new rubocop rules Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. --- actionpack/lib/action_dispatch/http/parameters.rb | 2 +- actionpack/lib/action_dispatch/http/request.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/http') diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb index 42e80b9bf5..31ef0af791 100644 --- a/actionpack/lib/action_dispatch/http/parameters.rb +++ b/actionpack/lib/action_dispatch/http/parameters.rb @@ -8,7 +8,7 @@ module ActionDispatch DEFAULT_PARSERS = { Mime[:json].symbol => -> (raw_post) { data = ActiveSupport::JSON.decode(raw_post) - data.is_a?(Hash) ? data : {_json: data} + data.is_a?(Hash) ? data : { _json: data } } } diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index e7cc6d5f31..e4ef9783f3 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -68,7 +68,7 @@ module ActionDispatch PASS_NOT_FOUND = Class.new { # :nodoc: def self.action(_); self; end - def self.call(_); [404, {"X-Cascade" => "pass"}, []]; end + def self.call(_); [404, { "X-Cascade" => "pass" }, []]; end def self.encoding_for_param(action, param); ::Encoding::UTF_8; end } -- cgit v1.2.3