aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-08-13 18:00:08 +0000
committerRick Olson <technoweenie@gmail.com>2006-08-13 18:00:08 +0000
commitc963f8e955ca5a2d1cc668ee5fa1f7e5f1fba689 (patch)
treeb829123383b5c6e15830abc7d6488ce3351fc82b /actionpack/lib/action_controller/routing.rb
parent84bacf99d67617421edfbbd787c845afb34a9d06 (diff)
downloadrails-c963f8e955ca5a2d1cc668ee5fa1f7e5f1fba689.tar.gz
rails-c963f8e955ca5a2d1cc668ee5fa1f7e5f1fba689.tar.bz2
rails-c963f8e955ca5a2d1cc668ee5fa1f7e5f1fba689.zip
Tweak RoutingError message to show option diffs, not just missing named route significant keys. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 8dd5f37a8b..e4d8253714 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -1007,8 +1007,8 @@ module ActionController
merged = recall.merge(options)
if named_route
- path = named_route.generate(options, merged, expire_on)
- raise RoutingError, "#{named_route_name}_url failed to generate from #{options.inspect}, missing: #{(named_route.significant_keys - options.keys).inspect}" if path.nil?
+ path = named_route.generate(options, merged, expire_on)
+ raise RoutingError, "#{named_route_name}_url failed to generate from #{options.inspect}, expected: #{named_route.requirements.inspect}, diff: #{named_route.requirements.diff(options).inspect}" if path.nil?
return path
else
merged[:action] ||= 'index'