diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-24 15:40:14 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-27 11:19:21 -0300 |
commit | 986bad6a3b89fed39c02f87068210f0c74e083cd (patch) | |
tree | 273bb4f9d82a4f8d0a7f0d6c16ae0262178838ab /actionpack | |
parent | b9fa46ca97b448d8cf5b285750341da50d417f8a (diff) | |
download | rails-986bad6a3b89fed39c02f87068210f0c74e083cd.tar.gz rails-986bad6a3b89fed39c02f87068210f0c74e083cd.tar.bz2 rails-986bad6a3b89fed39c02f87068210f0c74e083cd.zip |
Remove warning "too many arguments for format string" when interpolating with empty hash.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f6d625e7c3..5e95d8ed39 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -350,7 +350,7 @@ module ActionDispatch options = args.last.is_a?(Hash) ? args.pop : {} path = args.shift || block - path_proc = path.is_a?(Proc) ? path : proc { |params| path % params } + path_proc = path.is_a?(Proc) ? path : proc { |params| params.empty? ? path : (path % params) } status = options[:status] || 301 lambda do |env| |