aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/segments.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-03-04 14:37:59 -0600
committerJoshua Peek <josh@joshpeek.com>2009-03-04 14:37:59 -0600
commit638b3b15a13c4e274cfb317c40248e9feea3bfae (patch)
tree789772b55b67e7dcb70a5dfa2c14d3f64f83734f /actionpack/lib/action_controller/routing/segments.rb
parent6087fe8eedf0249f74be10721714f5298286b198 (diff)
downloadrails-638b3b15a13c4e274cfb317c40248e9feea3bfae.tar.gz
rails-638b3b15a13c4e274cfb317c40248e9feea3bfae.tar.bz2
rails-638b3b15a13c4e274cfb317c40248e9feea3bfae.zip
Generating routes with optional format segment does not inherit params format [#2043 state:resolved]
Diffstat (limited to 'actionpack/lib/action_controller/routing/segments.rb')
-rw-r--r--actionpack/lib/action_controller/routing/segments.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing/segments.rb b/actionpack/lib/action_controller/routing/segments.rb
index 358b4a6487..4f936d51d2 100644
--- a/actionpack/lib/action_controller/routing/segments.rb
+++ b/actionpack/lib/action_controller/routing/segments.rb
@@ -324,7 +324,11 @@ module ActionController
def to_s
'(.:format)?'
end
-
+
+ def extract_value
+ "#{local_name} = options[:#{key}] && options[:#{key}].to_s.downcase"
+ end
+
#the value should not include the period (.)
def match_extraction(next_capture)
%[