diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-26 13:38:21 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-26 13:38:21 +0000 |
commit | 7a6a923f983a2d642a4efd4e962b4385987e167a (patch) | |
tree | 33351ac4dd0f5449bbd0f9c349bb0af20f201a59 /actionpack/lib/action_controller/base.rb | |
parent | cef57e0cc244062663ad5fc5652072a12f06aaf2 (diff) | |
download | rails-7a6a923f983a2d642a4efd4e962b4385987e167a.tar.gz rails-7a6a923f983a2d642a4efd4e962b4385987e167a.tar.bz2 rails-7a6a923f983a2d642a4efd4e962b4385987e167a.zip |
Added trailing_slash option to url_for, so you can generate urls ending in a slash. Note that is currently not recommended unless you need it for special reasons since it breaks caching #937 [stian@grytoyr.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1001 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index a0c1bb2e2e..ba0feef98e 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -343,6 +343,8 @@ module ActionController #:nodoc: # <tt>url_for :controller => 'posts', :action => 'show', :id => 10, :anchor => 'comments'</tt> # will produce "/posts/show/10#comments". # * <tt>:only_path</tt> -- if true, returns the absolute URL (omitting the protocol, host name, and port) + # * <tt>:trailing_slash</tt> -- if true, adds a trailing slash, as in "/archive/2005/". Note that this + # is currently not recommended since it breaks caching. # * <tt>:host</tt> -- overrides the default (current) host if provided # * <tt>:protocol</tt> -- overrides the default (current) protocol if provided # |