diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-09 01:38:17 +0100 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-09 01:38:17 +0100 |
commit | 13c6c3cfc59ff0b400b294dce15f32752b0fb5f5 (patch) | |
tree | 052ac9c8f4adb91a4b32e3b2a97b1bc6bdace2e6 /actionpack/lib/action_controller/resources.rb | |
parent | ccb96f2297e8783165cba764e9b5d51e1a15ff87 (diff) | |
parent | 4e60eebae05aeec65e4894e3901c9d61c9b32910 (diff) | |
download | rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.tar.gz rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.tar.bz2 rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.zip |
Merge commit 'origin/master' into savepoints
Diffstat (limited to 'actionpack/lib/action_controller/resources.rb')
-rw-r--r-- | actionpack/lib/action_controller/resources.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/resources.rb b/actionpack/lib/action_controller/resources.rb index b6cfe2dd68..e8988aa737 100644 --- a/actionpack/lib/action_controller/resources.rb +++ b/actionpack/lib/action_controller/resources.rb @@ -283,7 +283,12 @@ module ActionController # * <tt>:new</tt> - Same as <tt>:collection</tt>, but for actions that operate on the new \resource action. # * <tt>:controller</tt> - Specify the controller name for the routes. # * <tt>:singular</tt> - Specify the singular name used in the member routes. - # * <tt>:requirements</tt> - Set custom routing parameter requirements. + # * <tt>:requirements</tt> - Set custom routing parameter requirements; this is a hash of either + # regular expressions (which must match for the route to match) or extra parameters. For example: + # + # map.resource :profile, :path_prefix => ':name', :requirements => { :name => /[a-zA-Z]+/, :extra => 'value' } + # + # will only match if the first part is alphabetic, and will pass the parameter :extra to the controller. # * <tt>:conditions</tt> - Specify custom routing recognition conditions. \Resources sets the <tt>:method</tt> value for the method-specific routes. # * <tt>:as</tt> - Specify a different \resource name to use in the URL path. For example: # # products_path == '/productos' |