diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-20 14:39:55 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-20 14:39:55 -0800 |
commit | 90410b4c3a1172b97899c1825bc77be86a86e3fc (patch) | |
tree | 4993851dab440d321de71297108cc42d83f6b094 /actionpack/lib/action_dispatch/routing | |
parent | cb6ccadcebf92dc41c774e961db3e559e26d4945 (diff) | |
download | rails-90410b4c3a1172b97899c1825bc77be86a86e3fc.tar.gz rails-90410b4c3a1172b97899c1825bc77be86a86e3fc.tar.bz2 rails-90410b4c3a1172b97899c1825bc77be86a86e3fc.zip |
stop splatting so much. We don't need :star:args everywhere
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index db1e3198b3..5b7f1c989c 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -464,7 +464,7 @@ module ActionDispatch # # get 'bacon', :to => 'food#bacon' def get(*args, &block) - map_method(:get, *args, &block) + map_method(:get, args, &block) end # Define a route that only recognizes HTTP POST. @@ -474,7 +474,7 @@ module ActionDispatch # # post 'bacon', :to => 'food#bacon' def post(*args, &block) - map_method(:post, *args, &block) + map_method(:post, args, &block) end # Define a route that only recognizes HTTP PUT. @@ -484,7 +484,7 @@ module ActionDispatch # # put 'bacon', :to => 'food#bacon' def put(*args, &block) - map_method(:put, *args, &block) + map_method(:put, args, &block) end # Define a route that only recognizes HTTP PUT. @@ -494,15 +494,14 @@ module ActionDispatch # # delete 'broccoli', :to => 'food#broccoli' def delete(*args, &block) - map_method(:delete, *args, &block) + map_method(:delete, args, &block) end private - def map_method(method, *args, &block) + def map_method(method, args, &block) options = args.extract_options! options[:via] = method - args.push(options) - match(*args, &block) + match(*args, options, &block) self end end |