aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/route.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/routing/route.rb')
-rw-r--r--actionpack/lib/action_controller/routing/route.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing/route.rb b/actionpack/lib/action_controller/routing/route.rb
index 94134a284e..a83a599e35 100644
--- a/actionpack/lib/action_controller/routing/route.rb
+++ b/actionpack/lib/action_controller/routing/route.rb
@@ -62,7 +62,7 @@ module ActionController
def generation_requirements
requirement_conditions = requirements.collect do |key, req|
if req.is_a? Regexp
- value_regexp = Regexp.new "\\A#{req.source}\\Z"
+ value_regexp = Regexp.new "\\A#{req.to_s}\\Z"
"hash[:#{key}] && #{value_regexp.inspect} =~ options[:#{key}]"
else
"hash[:#{key}] == #{req.inspect}"
@@ -237,4 +237,4 @@ module ActionController
end
end
-end \ No newline at end of file
+end