aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 15:42:40 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 15:42:40 +0000
commit7e745f3aa5de4e117758ee92e2ca92aa265c6deb (patch)
treea98c346b62f52b4cf8197086ae8b731a3695c5f3 /actionpack/CHANGELOG
parent6cd3bda32f6183f2e31a3b62e35c01655e8debc4 (diff)
downloadrails-7e745f3aa5de4e117758ee92e2ca92aa265c6deb.tar.gz
rails-7e745f3aa5de4e117758ee92e2ca92aa265c6deb.tar.bz2
rails-7e745f3aa5de4e117758ee92e2ca92aa265c6deb.zip
Added to_param call for parameters when composing an url using url_for from something else than strings #812 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r--actionpack/CHANGELOG21
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index d89389338c..dcaa5cecd4 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,26 @@
*SVN*
+* Added to_param call for parameters when composing an url using url_for from something else than strings #812 [Sam Stephenson]. Example:
+
+ class Page
+   def initialize(number)
+     @number = number
+   end
+   # ...
+   def to_param
+     @number.to_s
+   end
+ end
+
+ You can now use instances of Page with url_for:
+
+ class BarController < ApplicationController
+   def baz
+     page = Page.new(4)
+     url = url_for :page => page # => "http://foo/bar/baz?page=4"
+   end
+ end
+
* Fixed form helpers to query Model#id_before_type_cast instead of Model#id as a temporary workaround for Ruby 1.8.2 warnings #818 [DeLynn B]
* Fixed TextHelper#markdown to use blank? instead of empty? so it can deal with nil strings passed #814 [Johan Sörensen]