From 810dff7c9fa9b2a38eb1560ce0378d760529ee6b Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 2 Sep 2016 00:43:33 +0200 Subject: RuboCop is 100% green :tada: --- actionpack/lib/action_dispatch/routing/route_set.rb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 864ffe3a79..8d0bf680c8 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -282,16 +282,17 @@ module ActionDispatch mod.module_eval do define_method(name) do |*args| last = args.last - options = case last - when Hash - args.pop - when ActionController::Parameters - if last.permitted? - args.pop.to_h - else - raise ArgumentError, ActionDispatch::Routing::INSECURE_URL_PARAMETERS_MESSAGE - end - end + options = \ + case last + when Hash + args.pop + when ActionController::Parameters + if last.permitted? + args.pop.to_h + else + raise ArgumentError, ActionDispatch::Routing::INSECURE_URL_PARAMETERS_MESSAGE + end + end helper.call self, args, options end end -- cgit v1.2.3