diff options
author | Xavier Noria <fxn@hashref.com> | 2016-09-02 00:43:33 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-09-02 00:43:33 +0200 |
commit | 810dff7c9fa9b2a38eb1560ce0378d760529ee6b (patch) | |
tree | d5ea948c1f0043c7bc4c5b10241279e448a6d696 /actionpack/lib/action_dispatch | |
parent | 11eaf1c1dd48e86a38b8dc83a2b35d99f746b1f8 (diff) | |
download | rails-810dff7c9fa9b2a38eb1560ce0378d760529ee6b.tar.gz rails-810dff7c9fa9b2a38eb1560ce0378d760529ee6b.tar.bz2 rails-810dff7c9fa9b2a38eb1560ce0378d760529ee6b.zip |
RuboCop is 100% green :tada:
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 21 |
1 files changed, 11 insertions, 10 deletions
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 |