diff options
author | José Valim <jose.valim@gmail.com> | 2011-07-25 15:51:43 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-07-25 15:51:43 -0700 |
commit | 647eeb1881fba7863d7281515f9863f47e552ed5 (patch) | |
tree | d63662e83b3657d78df8aeabe9f09ff522e716e9 /actionpack/lib | |
parent | cb85d70d61705381a57cb99d8dcd4d7083f0a143 (diff) | |
parent | c17254319b7fadb789cde24d1e72a233a33e4ac7 (diff) | |
download | rails-647eeb1881fba7863d7281515f9863f47e552ed5.tar.gz rails-647eeb1881fba7863d7281515f9863f47e552ed5.tar.bz2 rails-647eeb1881fba7863d7281515f9863f47e552ed5.zip |
Merge pull request #2262 from sferik/format_true
Allow a route to have :format => true
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 1331f67a78..003bc1dc2c 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -119,6 +119,8 @@ module ActionDispatch path elsif path.include?(":format") || path.end_with?('/') path + elsif @options[:format] == true + "#{path}.:format" else "#{path}(.:format)" end |