<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>instiki.bat</filename>
    </added>
    <added>
      <filename>vendor/rails/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb</filename>
    </added>
    <added>
      <filename>vendor/rails/activerecord/test/fixtures/binaries.yml</filename>
    </added>
    <added>
      <filename>vendor/rails/activesupport/test/json_test.rb</filename>
    </added>
    <added>
      <filename>vendor/rails/railties/lib/tasks/routes.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,30 @@
- * TRUNK:
+------------------------------------------------------------------------------
+ * 0.12.0:
+ 
+ 0.12 is mainly a bugfix release. We recommend all instiki Users to upgrade.
+ In this version, some security holes where fixed
+	- An XSS vulnerability in categories
+	- An XSS vulnerability in &lt;nowiki&gt;
+	- fixes that Instiki allows &quot;dangerous&quot; operations as HTTP GETs
+
+ as well as some other small improvements.
+	- fixes for instiki running on mongrel
+	- fixes for instiki running on mongrel_cluster
+
+ We added a lot of tests, synced with Jacques Distler's version and fixed 
+ small bugs as well. A note to Mac OSX users: use the Ruby One-Click-Installer
+ for OSX ( http://rubyosx.com ) or make sure you are not running into problems
+ with sqlite (see http://instiki.5uper.net/instiki/show/SQLite+issues+on+OSX)
+
+------------------------------------------------------------------------------
+ * 0.11.pl1
 
  - ANTISPAM: 
    - updated and included spam_patterns.txt
    - included dnsbl_check - DNS Blackhole Lists check
      [thanks to joost from http://www.spacebabies.nl ]
+   - included the form-spam-protection rails plugin
+     http://form-spam-protection.googlecode.com/svn/form_spam_protection/
 
  - BUGFIXES:
    - fix PDF output not to contain garbage chars [Jesse Newland]
@@ -16,10 +37,9 @@
    - lots of small bugfixes and changes
 
  - UPDATES:
-   - Rails 1.2 tested and packaged with instiki
+   - Rails 1.2.1 tested and packaged with instiki
    - updated RubyZip to 0.9.1
-   - updated RedCloth to 3.0.4
-   - updated packaged sqlite3-ruby to 1.2.0
+   - updated packaged sqlite3-ruby
 
  - FEATURES:
    - fix: being logged in on more Webs at once works now [Jaques Distler]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -1,39 +1,61 @@
-===What is Instiki?
-
-Admitted, it's YetAnotherWikiClone[http://c2.com/cgi/wiki?WikiWikiClones], but with a strong focus
-on simplicity of installation and running:
-
-Step 1. Download
-Step 2. Run &quot;instiki&quot;
-
-If you are on Windows:
-&quot;Step 3. Chuckle... &quot;There's no step three!&quot; (TM)&quot;
-
-You're now running a perfectly suitable wiki on port 2500 
-that'll present you with one-step setup, followed by a textarea for the home page
-on http://localhost:2500
-
-Instiki lowers the barriers of interest for when you might consider
-using a wiki. It's so simple to get running that you'll find yourself
-using it for anything -- taking notes, brainstorming, organizing a 
-gathering.
-
-Having said all that, if you are not on Windows, in this version of Instiki it is a somewhat different story.
-Since the author has no Linux or Mac at hand, and Instiki is moving to a SQL-based backend, this is what it takes 
-to install (until somebody sends a patch to properly package Instiki for all those other platforms):
-
-3. Kill &quot;instiki&quot;
-4. Install SQLite 3 database engine from http://www.sqlite.org/
-5. Install SQLite 3 driver for Ruby from http://sqlite-ruby.rubyforge.org/
-6. Install Rake from http://rake.rubyforge.org/
-7. Execute rm -f db/*.db
-8. Execute 'rake environment RAILS_ENV=production migrate'
-9. Make an embarrassed sigh (as I do while writing this)
-10. Run 'instiki' again
-11. Pat yourself on the shoulder for being such a talented geek
-12. At least, there is no step twelve! (TM)
-
-===Features:
+
+= Instiki
+
+Instiki is a wiki clone so pretty and easy to set up, you'll wonder if it&#8217;s really a wiki. Runs on Rails and focuses on portability and stability. Supports file uploads, PDF export, RSS, multiple users and password protection. Some use Instiki as a CMS (Content Management System) because of it's ability to export static pages.
+
+Instiki lowers the barriers of interest for when you might consider using a wiki. It's so simple to get running that you'll find yourself using it for anything -- taking notes, brainstorming, organizing a gathering.
+
+
+== Supported Platforms
+
+Instiki only relies on Ruby - the sole external dependency (it includes all other dependencies). Any OS that can run Ruby can run Instiki - that includes Windows, Linux, Mac OS X and most known Unix flavors.
+
+Instiki on BeOS, Amiga OS, OS2, Zeta OS and support for various exotic Platforms is planned. Mostly it already works, if Ruby runs there (download the linux version in this case). Please contact parasew if you want to help out for your OS that is not listed. Please also get in touch if you are able to create an instiki package for your favorite unix or linux distribution.
+
+
+== 3 easy Steps to get the Instiki experience
+
+  Step 1. Get Ruby, Download Instiki
+  Step 2. Run &quot;instiki&quot;
+  Step 3. Chuckle... &quot;There's no step three!&quot; (TM)
+ 
+
+== Details
+
+You need at least Ruby Version 1.8.4 installed on your System. The second dependency is a Database System, but don't worry, maybe you are already served.
+
+
+=== If you are on Windows
+
+- Get the *Ruby One-Click Installer - Windows* http://rubyforge.org/projects/rubyinstaller
+- double-click instiki.bat or instiki.cmd and there you go!
+
+if you are running Windows 95, 98 or ME and cannot get instiki to run, try Version 0.11.pl1 which is the last instiki Version to support that old-style OS's. Please update to some Unix-OS or complain to the Ruby on Rails List at http://www.ruby-forum.com/forum/3 (Rails does not support your old Windows.)
+
+
+=== If you are on Mac OSX
+
+Since the Apple guys really screwed it up, having an old Ruby Version (1.8.2) and a broken Readline Library with MacOSX Tiger, you have to
+
+- use the Ruby One-Click-Installer for OSX ( http://rubyosx.com ) if you don't already have macports' Ruby
+- make sure you read http://instiki.5uper.net/instiki/show/SQLite+issues+on+OSX
+- run &quot;ruby instiki.rb&quot; via command-line in the directory 
+
+
+=== If you are on Linux
+
+
+=== Any other System
+
+- get Ruby for your System, compile if nessesary: http://ruby-lang.org
+- get SQLite or compile from http://sqlite.org (you can also use mysql or any other supported database system if you want)
+- run instiki
+
+You're now running a perfectly suitable wiki on port 2500 that'll present you with one-step setup, followed by a textarea for the home page on http://localhost:2500
+
+
+== Features
+
 * Regular expression search: Find deep stuff really fast
 * Revisions: Follow the changes on every page from birth. Rollback to an earlier rev
 * Export to HTML or markup in a zip: Take the entire wiki with you home or for reference
@@ -42,24 +64,27 @@ to install (until somebody sends a patch to properly package Instiki for all tho
 * Password-protected webs: Keep it private
 * Authors: Each revision is associated with an author, so you can see who changed what
 * Reference tracker: Which other pages are pointing to the current?
-* Speed: Using Madelein[http://madeleine.sourceforge.net] for persistence (all pages are in memory)
-* Three markup choices: Textile[http://www.textism.com/tools/textile] 
-  (default / RedCloth[http://www.whytheluckystiff.net/ruby/redcloth]), 
+* Three markup choices: Textile http://www.textism.com/tools/textile
+  (default / RedCloth http://www.whytheluckystiff.net/ruby/redcloth ), 
   Markdown (BlueCloth[http://bluecloth.rubyforge.org]), and RDoc[http://rdoc.sourceforge.net/doc]
-* Embedded webserver: Through WEBrick[http://www.webrick.org]
+* Embedded webserver: Through WEBrick[http://www.webrick.org], also runs on Mongel if you want to.
 * Internationalization: Wiki words in any latin, greek, cyrillian, or armenian characters
 * Color diffs: Track changes through revisions
-* Definitely can run on SQLite and MySQL
-* May be able to run on Postgres, Oracle, DB2 and SqlServer. If you try this, and it works 
-  (or, it doesn't, but you make it work) please write about it on Instiki.org.
+* Runs on SQLite per default, can be configured to run on PostgreSQL, MySQL, DB2, Firebird, Openbase, Oracle, SQL Server or Sybase
+
+
+== Command-line options:
 
-===Command-line options:
 * Run &quot;ruby instiki --help&quot;
 
-===History:
+
+== History:
+
  * See CHANGELOG
 
-===Migrating Instiki 0.10.2 storage to Instiki 0.11.0 database
+
+== Migrating Instiki 0.10.2 storage to Instiki 0.11.0 database
+
 1. Install Instiki 0.11 and check that it works (you should be able to create a web, edit and save a HomePage)
 2. Execute 
       ruby script\import_storage \
@@ -81,7 +106,9 @@ to install (until somebody sends a patch to properly package Instiki for all tho
 The most common migration problem is this: if you open All Pages and see a lot of orphaned pages, 
 you forgot to run ruby script\reset_references after importing the data.
 
+
 ===Upgrading from Instiki-AR Beta 1
+
 In Beta 2, we switch to ActiveRecord:Migrations. Therefore:
 1. Back up your production database.
 2. Open command-line session to your database and execute: 
@@ -93,21 +120,33 @@ Step 2 creates a table that tells to ActiveRecord:Migrations that the current ve
 of this database is 1 (corresponding to Beta 1), and step 3 makes it up-to-date with
 the current version of Instiki.
 
-===Download the latest release from:
+
+== Download the latest release from:
+
 * http://rubyforge.org/project/showfiles.php?group_id=186
 
-===Visit the &quot;official&quot; Instiki wiki:
+
+== Visit the &quot;official&quot; Instiki wiki:
+
 * http://instiki.org
 
-===License:
+
+== License:
+
 * same as Ruby's
 
+
 ---
+
 Authors::
 
 Versions 0.0 to 0.9.1:: David Heinemeier Hansson
-Email::  david@loudthinking.com
-Weblog:: http://www.loudthinking.com
+Email::  david[AT]loudthinking.com
+Weblog:: http://www.loudthinking.com[http://www.loudthinking.com]
 
 From 0.9.2 onwards:: Alexey Verkhovsky
-Email:: alex@verk.info
+Email:: alex[AT]verk.info
+
+From 0.11 onwards:: Matthias Tarasiewicz and 5uper.net
+Email:: parasew[AT]gmail.com
+Website:: http://5uper.net[http://5uper.net]</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -219,7 +219,7 @@ end
 module Instiki
   module VERSION #:nodoc:
     MAJOR = 0
-    MINOR = 12
+    MINOR = 13
     TINY  = 0
     SUFFIX = '(MML+)'
     PRERELEASE = 'pre' # false</diff>
      <filename>app/controllers/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ class Page &lt; ActiveRecord::Base
     if (revisions_size &gt; 0) &amp;&amp; continous_revision?(time, author)
       current_revision.update_attributes(:content =&gt; content, :revised_at =&gt; time)
     else
-      revisions.create(:content =&gt; content, :author =&gt; author, :revised_at =&gt; time)
+      revisions.build(:content =&gt; content, :author =&gt; author, :revised_at =&gt; time)
     end
     save
     self</diff>
      <filename>app/models/page.rb</filename>
    </modified>
    <modified>
      <diff>@@ -143,19 +143,19 @@ class PageRenderer
       else
         link_type = WikiReference.link_type(@revision.page.web, referenced_name)
       end
-      references.create :referenced_name =&gt; referenced_name, :link_type =&gt; link_type
+      references.build :referenced_name =&gt; referenced_name, :link_type =&gt; link_type
     end
     
     include_chunks = rendering_result.find_chunks(Include)
     includes = include_chunks.map { |c| ( c.escaped? ? nil : c.page_name ) }.compact.uniq
     includes.each do |included_page_name|
-      references.create :referenced_name =&gt; included_page_name, 
+      references.build :referenced_name =&gt; included_page_name, 
           :link_type =&gt; WikiReference::INCLUDED_PAGE
     end
     
     categories = rendering_result.find_chunks(Category).map { |cat| cat.list }.flatten
     categories.each do |category|
-      references.create :referenced_name =&gt; category, :link_type =&gt; WikiReference::CATEGORY
+      references.build :referenced_name =&gt; category, :link_type =&gt; WikiReference::CATEGORY
     end
   end
 end</diff>
      <filename>lib/page_renderer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 require 'yaml'
 require 'time'
+require 'md5'
 
 module ActionController
   class AbstractResponse #:nodoc:</diff>
      <filename>vendor/plugins/action_cache/lib/action_cache.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,13 @@
+*1.3.5* (October 12th, 2007)
+
+* Depend on Action Pack 1.13.5
+
+
+*1.3.4* (October 4th, 2007)
+
+* Depend on Action Pack 1.13.4
+
+
 *1.3.3* (March 12th, 2007)
 
 * Depend on Action Pack 1.13.3</diff>
      <filename>vendor/rails/actionmailer/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -54,7 +54,7 @@ spec = Gem::Specification.new do |s|
   s.rubyforge_project = &quot;actionmailer&quot;
   s.homepage = &quot;http://www.rubyonrails.org&quot;
 
-  s.add_dependency('actionpack', '= 1.13.3' + PKG_BUILD)
+  s.add_dependency('actionpack', '= 1.13.5' + PKG_BUILD)
 
   s.has_rdoc = true
   s.requirements &lt;&lt; 'none'</diff>
      <filename>vendor/rails/actionmailer/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module ActionMailer
   module VERSION #:nodoc:
     MAJOR = 1
     MINOR = 3
-    TINY  = 3
+    TINY  = 5
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>vendor/rails/actionmailer/lib/action_mailer/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,55 @@
+*1.13.5* (October 12th, 2007)
+
+* Backport: allow array and hash query parameters. Array route parameters are converted/to/a/path as before.  #6765, #7047, #7462 [bgipsy, Jeremy McAnally, Dan Kubb, brendan, Diego Algorta Casamayou]
+
+* Fix in place editor's setter action with non-string fields.  #7418 [Andreas]
+
+
+*1.13.4* (October 4th, 2007)
+
+* Only accept session ids from cookies, prevents session fixation attacks.  [bradediger]
+
+* Change the resource seperator from ; to / change the generated routes to use the new-style named routes.  e.g.  new_group_user_path(@group) instead of group_new_user_path(@group). [pixeltrix]
+
+* Integration tests: introduce methods for other HTTP methods.  #6353 [caboose]
+
+* Improve performance of action caching. Closes #8231 [skaes]
+
+* Fix errors with around_filters which do not yield, restore 1.1 behaviour with after filters. Closes #8891 [skaes]
+
+  After filters will *no longer* be run if an around_filter fails to yield, users relying on
+  this behaviour are advised to put the code in question after a yield statement in an around filter.
+
+* Allow you to delete cookies with options. Closes #3685 [josh, Chris Wanstrath]
+
+* Deprecate pagination. Install the classic_pagination plugin for forward compatibility, or move to the superior will_paginate plugin.  #8157 [Mislav Marohnic]
+
+* Fix filtered parameter logging with nil parameter values.  #8422 [choonkeat]
+
+* Integration tests: alias xhr to xml_http_request and add a request_method argument instead of always using POST.  #7124 [Nik Wakelin, Francois Beausoleil, Wizard]
+
+* Document caches_action.  #5419 [Jarkko Laine]
+
+* observe_form always sends the serialized form.  #5271 [manfred, normelton@gmail.com]
+
+* Update UrlWriter to accept :anchor parameter. Closes #6771. [octopod]
+
+* Replace the current block/continuation filter chain handling by an implementation based on a simple loop.  Closes #8226 [Stefan Kaes]
+
+* Return the string representation from an Xml Builder when rendering a partial.  #5044 [tpope]
+
+* Cleaned up, corrected, and mildly expanded ActionPack documentation.  Closes #7190 [jeremymcanally]
+
+* Small collection of ActionController documentation cleanups.  Closes #7319 [jeremymcanally]
+
+* Performance: patch cgi/session/pstore to require digest/md5 once rather than per #initialize.  #7583 [Stefan Kaes]
+
+* Deprecation: verification with :redirect_to =&gt; :named_route shouldn't be deprecated.  #7525 [Justin French]
+
+
 *1.13.3* (March 12th, 2007)
 
-* Apply [5709] to stable.
+* Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next.  #6752 [Nicholas Seckar]
 
 * session_enabled? works with session :off.  #6680 [Catfish]
 
@@ -440,7 +489,7 @@
 
 * Avoid naming collision among compiled view methods. [Jeremy Kemper]
 
-* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [mislav@nippur.irb.hr]
+* Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [Mislav Marohnic]
 
 * Determine the correct template_root for deeply nested components.  #2841 [s.brink@web.de]
 </diff>
      <filename>vendor/rails/actionpack/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -75,7 +75,7 @@ spec = Gem::Specification.new do |s|
   s.has_rdoc = true
   s.requirements &lt;&lt; 'none'
 
-  s.add_dependency('activesupport', '= 1.4.2' + PKG_BUILD)
+  s.add_dependency('activesupport', '= 1.4.4' + PKG_BUILD)
 
   s.require_path = 'lib'
   s.autorequire = 'action_controller'</diff>
      <filename>vendor/rails/actionpack/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module ActionController
   module Assertions
     module DomAssertions
-      # test 2 html strings to be equivalent, i.e. identical up to reordering of attributes
+      # Test two HTML strings for equivalency (e.g., identical up to reordering of attributes)
       def assert_dom_equal(expected, actual, message=&quot;&quot;)
         clean_backtrace do
           expected_dom = HTML::Document.new(expected).root
@@ -11,7 +11,7 @@ module ActionController
         end
       end
       
-      # negated form of +assert_dom_equivalent+
+      # The negated form of +assert_dom_equivalent+.
       def assert_dom_not_equal(expected, actual, message=&quot;&quot;)
         clean_backtrace do
           expected_dom = HTML::Document.new(expected).root</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module ActionController
   module Assertions
     module ModelAssertions
-      # ensures that the passed record is valid by active record standards. returns the error messages if not
+      # Ensures that the passed record is valid by ActiveRecord standards and returns any error messages if it is not.
       def assert_valid(record)
         clean_backtrace do
           assert record.valid?, record.errors.full_messages.join(&quot;\n&quot;)</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -69,6 +69,7 @@ module ActionController
               end
 
               if value.respond_to?(:[]) &amp;&amp; value['controller']
+                value['controller'] = value['controller'].to_s
                 if key == :actual &amp;&amp; value['controller'].first != '/' &amp;&amp; !value['controller'].include?('/')
                   new_controller_path = ActionController::Routing.controller_relative_to(value['controller'], @controller.class.controller_path)
                   value['controller'] = new_controller_path if value['controller'] != new_controller_path &amp;&amp; ActionController::Routing.possible_controllers.include?(new_controller_path)
@@ -120,6 +121,7 @@ module ActionController
       end
 
       private
+        # Recognizes the route for a given path.
         def recognized_request_for(path, request_method = nil)
           path = &quot;/#{path}&quot; unless path.first == '/'
 
@@ -132,6 +134,7 @@ module ActionController
           request
         end
 
+        # Proxy to to_param if the object will respond to it.
         def parameterize(value)
           value.respond_to?(:to_param) ? value.to_param : value
         end</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -82,6 +82,7 @@ module ActionController
       end
 
       private
+        # Recognizes the route for a given path.
         def recognized_request_for(path, request_method = nil)
           path = &quot;/#{path}&quot; unless path.first == '/'
 </diff>
      <filename>vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -561,6 +561,8 @@ module ActionController
           # RJS encodes double quotes and line breaks.
           unescaped= rjs_string.gsub('\&quot;', '&quot;')
           unescaped.gsub!('\n', &quot;\n&quot;)
+          unescaped.gsub!('\076', '&gt;')
+          unescaped.gsub!('\074', '&lt;')
           # RJS encodes non-ascii characters.
           unescaped.gsub!(RJS_PATTERN_UNICODE_ESCAPED_CHAR) {|u| [$1.hex].pack('U*')}
           unescaped</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,6 @@ require 'action_controller/url_rewriter'
 require 'action_controller/status_codes'
 require 'drb'
 require 'set'
-require 'md5' 
 
 module ActionController #:nodoc:
   class ActionControllerError &lt; StandardError #:nodoc:
@@ -293,6 +292,10 @@ module ActionController #:nodoc:
     # Turn on +ignore_missing_templates+ if you want to unit test actions without making the associated templates.
     cattr_accessor :ignore_missing_templates
 
+    # Controls the resource action separator
+    @@resource_action_separator = &quot;/&quot;
+    cattr_accessor :resource_action_separator
+
     # Holds the request object that's primarily used to get environment variables through access like
     # &lt;tt&gt;request.env[&quot;REQUEST_URI&quot;]&lt;/tt&gt;.
     attr_internal :request
@@ -394,7 +397,8 @@ module ActionController #:nodoc:
             elsif value.is_a?(Hash)
               filtered_parameters[key] = filter_parameters(value)
             elsif block_given?
-              key, value = key.dup, value.dup
+              key = key.dup
+              value = value.dup if value
               yield key, value
               filtered_parameters[key] = value
             else
@@ -539,6 +543,7 @@ module ActionController #:nodoc:
         self.class.controller_path
       end
 
+      # Test whether the session is enabled for this request.
       def session_enabled?
         request.session_options &amp;&amp; request.session_options[:disabled] != false
       end
@@ -600,12 +605,6 @@ module ActionController #:nodoc:
       # _Deprecation_ _notice_: This used to have the signatures
       # &lt;tt&gt;render_partial(partial_path = default_template_name, object = nil, local_assigns = {})&lt;/tt&gt; and
       # &lt;tt&gt;render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = {})&lt;/tt&gt;.
-      # == Automatic etagging 
-      # 
-      # Rendering will automatically insert the etag header on 200 OK responses. The etag is calculated using MD5 of the 
-      # response body. If a request comes in that has a matching etag, the response will be changed to a 304 Not Modified 
-      # and the response body will be set to an empty string. 
-      # 
       #
       # === Rendering a template
       #
@@ -829,8 +828,6 @@ module ActionController #:nodoc:
         else
           response.body = text
         end
-         
-        response.body 
       end
 
       def render_javascript(javascript, status = nil, append_response = true) #:nodoc:</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 require 'fileutils'
 require 'uri'
+require 'set'
 
 module ActionController #:nodoc:
   # Caching is a cheap way of speeding up slow applications by keeping the result of calculations, renderings, and database calls
@@ -163,13 +164,24 @@ module ActionController #:nodoc:
     module Actions
       def self.included(base) #:nodoc:
         base.extend(ClassMethods)
-        base.send(:attr_accessor, :rendered_action_cache)
+        base.class_eval do
+          attr_accessor :rendered_action_cache, :action_cache_path
+          alias_method_chain :protected_instance_variables, :action_caching
+        end
       end
 
-      module ClassMethods #:nodoc:
+      def protected_instance_variables_with_action_caching
+        protected_instance_variables_without_action_caching + %w(@action_cache_path)
+      end
+
+      module ClassMethods
+        # Declares that +actions+ should be cached.
+        # See ActionController::Caching::Actions for details.
         def caches_action(*actions)
           return unless perform_caching
-          around_filter(ActionCacheFilter.new(*actions))
+          action_cache_filter = ActionCacheFilter.new(*actions)
+          before_filter action_cache_filter
+          after_filter action_cache_filter
         end
       end
 
@@ -185,70 +197,59 @@ module ActionController #:nodoc:
       end
 
       class ActionCacheFilter #:nodoc:
-        def initialize(*actions, &amp;block)
-          @actions = actions
+        def initialize(*actions)
+          @actions = Set.new actions
         end
 
         def before(controller)
-          return unless @actions.include?(controller.action_name.intern)
-          action_cache_path = ActionCachePath.new(controller)
-          if cache = controller.read_fragment(action_cache_path.path)
+          return unless @actions.include?(controller.action_name.to_sym)
+          cache_path = ActionCachePath.new(controller, {})
+          if cache = controller.read_fragment(cache_path.path)
             controller.rendered_action_cache = true
-            set_content_type!(action_cache_path)
+            set_content_type!(controller, cache_path.extension)
             controller.send(:render_text, cache)
             false
+          else
+            controller.action_cache_path = cache_path
           end
         end
 
         def after(controller)
-          return if !@actions.include?(controller.action_name.intern) || controller.rendered_action_cache
-          controller.write_fragment(ActionCachePath.path_for(controller), controller.response.body)
+          return if !@actions.include?(controller.action_name.to_sym) || controller.rendered_action_cache
+          controller.write_fragment(controller.action_cache_path.path, controller.response.body)
         end
         
         private
-          
-          def set_content_type!(action_cache_path)
-            if extention = action_cache_path.extension
-              content_type = Mime::EXTENSION_LOOKUP[extention]
-              action_cache_path.controller.response.content_type = content_type.to_s
-            end
+          def set_content_type!(controller, extension)
+            controller.response.content_type = Mime::EXTENSION_LOOKUP[extension].to_s if extension
           end
           
       end
       
       class ActionCachePath
-        attr_reader :controller, :options
+        attr_reader :path, :extension
         
         class &lt;&lt; self
-          def path_for(*args, &amp;block)
-            new(*args).path
+          def path_for(controller, options)
+            new(controller, options).path
           end
         end
         
         def initialize(controller, options = {})
-          @controller = controller
-          @options    = options
-        end
-        
-        def path
-          return @path if @path
-          @path = controller.url_for(options).split('://').last
-          normalize!
-          add_extension!
-          URI.unescape(@path)
-        end
-        
-        def extension
-          @extension ||= extract_extension(controller.request.path)
+          @extension = extract_extension(controller.request.path)
+          path = controller.url_for(options).split('://').last
+          normalize!(path)
+          add_extension!(path, @extension)
+          @path = URI.unescape(path)
         end
         
         private
-          def normalize!
-            @path &lt;&lt; 'index' if @path.last == '/'
+          def normalize!(path)
+            path &lt;&lt; 'index' if path[-1] == ?/
           end
         
-          def add_extension!
-            @path &lt;&lt; &quot;.#{extension}&quot; if extension
+          def add_extension!(path, extension)
+            path &lt;&lt; &quot;.#{extension}&quot; if extension
           end
           
           def extract_extension(file_path)
@@ -472,7 +473,6 @@ module ActionController #:nodoc:
         end
 
         def write(name, value, options = nil) #:nodoc:
-          File.umask(0006)
           ensure_cache_path(File.dirname(real_file_path(name)))
           File.open(real_file_path(name), &quot;wb+&quot;) { |f| f.write(value) }
         rescue =&gt; e</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/caching.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ class CGI #:nodoc:
           if env_qs.blank? &amp;&amp; !(uri = env_table['REQUEST_URI']).blank?
             uri.split('?', 2)[1] || ''
           else
-            env_qs
+            env_qs || ''
           end
         end
       end</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ require 'action_controller/cgi_ext/cgi_ext'
 require 'action_controller/cgi_ext/cookie_performance_fix'
 require 'action_controller/cgi_ext/raw_post_data_fix'
 require 'action_controller/cgi_ext/session_performance_fix'
+require 'action_controller/cgi_ext/pstore_performance_fix'
 
 module ActionController #:nodoc:
   class Base
@@ -12,8 +13,8 @@ module ActionController #:nodoc:
     #   (default). Additionally, there is CGI::Session::DRbStore and CGI::Session::ActiveRecordStore. Read more about these in
     #   lib/action_controller/session.
     # * &lt;tt&gt;:session_key&lt;/tt&gt; - the parameter name used for the session id. Defaults to '_session_id'.
-    # * &lt;tt&gt;:session_id&lt;/tt&gt; - the session id to use.  If not provided, then it is retrieved from the +session_key+ parameter
-    #   of the request, or automatically generated for a new session.
+    # * &lt;tt&gt;:session_id&lt;/tt&gt; - the session id to use.  If not provided, then it is retrieved from the +session_key+ cookie, or 
+    #   automatically generated for a new session.
     # * &lt;tt&gt;:new_session&lt;/tt&gt; - if true, force creation of a new session.  If not set, a new session is only created if none currently
     #   exists.  If false, a new session is never created, and if none currently exists and the +session_id+ option is not set,
     #   an ArgumentError is raised.
@@ -23,6 +24,8 @@ module ActionController #:nodoc:
     #   server.
     # * &lt;tt&gt;:session_secure&lt;/tt&gt; - if +true+, this session will only work over HTTPS.
     # * &lt;tt&gt;:session_path&lt;/tt&gt; - the path for which this session applies.  Defaults to the directory of the CGI script.
+    # * &lt;tt&gt;:cookie_only&lt;/tt&gt; - if +true+ (the default), session IDs will only be accepted from cookies and not from
+    #   the query string or POST parameters. This protects against session fixation attacks.
     def self.process_cgi(cgi = CGI.new, session_options = {})
       new.process_cgi(cgi, session_options)
     end
@@ -33,18 +36,21 @@ module ActionController #:nodoc:
   end
 
   class CgiRequest &lt; AbstractRequest #:nodoc:
-    attr_accessor :cgi, :session_options
+    attr_accessor :cgi, :session_options, :cookie_only
+    class SessionFixationAttempt &lt; StandardError; end #:nodoc:
 
     DEFAULT_SESSION_OPTIONS = {
       :database_manager =&gt; CGI::Session::PStore,
       :prefix           =&gt; &quot;ruby_sess.&quot;,
-      :session_path     =&gt; &quot;/&quot;
+      :session_path     =&gt; &quot;/&quot;,
+      :cookie_only      =&gt; true
     } unless const_defined?(:DEFAULT_SESSION_OPTIONS)
 
     def initialize(cgi, session_options = {})
       @cgi = cgi
       @session_options = session_options
       @env = @cgi.send(:env_table)
+      @cookie_only = session_options.delete :cookie_only
       super()
     end
 
@@ -108,6 +114,9 @@ module ActionController #:nodoc:
           @session = Hash.new
         else
           stale_session_check! do
+            if @cookie_only &amp;&amp; request_parameters[session_options_with_string_keys['session_key']]
+              raise SessionFixationAttempt
+            end
             case value = session_options_with_string_keys['new_session']
               when true
                 @session = new_session</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/cgi_process.rb</filename>
    </modified>
    <modified>
      <diff>@@ -62,9 +62,11 @@ module ActionController #:nodoc:
     end
 
     # Removes the cookie on the client machine by setting the value to an empty string
-    # and setting its expiration date into the past
-    def delete(name)
-      set_cookie(&quot;name&quot; =&gt; name.to_s, &quot;value&quot; =&gt; &quot;&quot;, &quot;expires&quot; =&gt; Time.at(0))
+    # and setting its expiration date into the past.  Like []=, you can pass in an options
+    # hash to delete cookies with extra data such as a +path+.
+    def delete(name, options = {})
+      options.stringify_keys!
+      set_cookie(options.merge(&quot;name&quot; =&gt; name.to_s, &quot;value&quot; =&gt; &quot;&quot;, &quot;expires&quot; =&gt; Time.at(0)))
     end
 
     private</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/cookies.rb</filename>
    </modified>
    <modified>
      <diff>@@ -214,9 +214,10 @@ module ActionController #:nodoc:
     # == Filter Chain Halting
     #
     # &lt;tt&gt;before_filter&lt;/tt&gt; and &lt;tt&gt;around_filter&lt;/tt&gt; may halt the request
-    # before controller action is run. This is useful, for example, to deny
+    # before a controller action is run. This is useful, for example, to deny
     # access to unauthenticated users or to redirect from http to https.
     # Simply return false from the filter or call render or redirect.
+    # After filters will not be executed if the filter chain is halted.
     #
     # Around filters halt the request unless the action block is called.
     # Given these filters
@@ -238,12 +239,12 @@ module ActionController #:nodoc:
     #   .  .  /
     #   .  #around (code after yield)
     #   . /
-    #   #after (actual filter code is run)
+    #   #after (actual filter code is run, unless the around filter does not yield)
     #
-    # If #around returns before yielding, only #after will be run. The #before
-    # filter and controller action will not be run.  If #before returns false,
-    # the second half of #around and all of #after will still run but the
-    # action will not.
+    # If #around returns before yielding, #after will still not be run. The #before
+    # filter and controller action will not be run. If #before returns false,
+    # the second half of #around and will still run but #after and the
+    # action will not. If #around does not yield, #after will not be run.
     module ClassMethods
       # The passed &lt;tt&gt;filters&lt;/tt&gt; will be appended to the filter_chain and
       # will execute before the action on this controller is performed.
@@ -263,13 +264,13 @@ module ActionController #:nodoc:
       # The passed &lt;tt&gt;filters&lt;/tt&gt; will be appended to the array of filters
       # that run _after_ actions on this controller are performed.
       def append_after_filter(*filters, &amp;block)
-        prepend_filter_to_chain(filters, :after, &amp;block)
+        append_filter_to_chain(filters, :after, &amp;block)
       end
 
       # The passed &lt;tt&gt;filters&lt;/tt&gt; will be prepended to the array of filters
       # that run _after_ actions on this controller are performed.
       def prepend_after_filter(*filters, &amp;block)
-        append_filter_to_chain(filters, :after, &amp;block)
+        prepend_filter_to_chain(filters, :after, &amp;block)
       end
 
       # Shorthand for append_after_filter since it's the most common.
@@ -362,12 +363,12 @@ module ActionController #:nodoc:
 
       # Returns a mapping between filters and the actions that may run them.
       def included_actions #:nodoc:
-        read_inheritable_attribute(&quot;included_actions&quot;) || {}
+        @included_actions ||= read_inheritable_attribute(&quot;included_actions&quot;) || {}
       end
 
       # Returns a mapping between filters and actions that may not run them.
       def excluded_actions #:nodoc:
-        read_inheritable_attribute(&quot;excluded_actions&quot;) || {}
+        @excluded_actions ||= read_inheritable_attribute(&quot;excluded_actions&quot;) || {}
       end
 
       # Find a filter in the filter_chain where the filter method matches the _filter_ param
@@ -381,10 +382,11 @@ module ActionController #:nodoc:
 
       # Returns true if the filter is excluded from the given action
       def filter_excluded_from_action?(filter,action) #:nodoc:
-        if (ia = included_actions[filter]) &amp;&amp; !ia.empty?
+        case
+        when ia = included_actions[filter]
           !ia.include?(action)
-        else
-          (excluded_actions[filter] || []).include?(action)
+        when ea = excluded_actions[filter]
+          ea.include?(action)
         end
       end
 
@@ -397,20 +399,28 @@ module ActionController #:nodoc:
           @filter = filter
         end
 
+        def type
+          :around
+        end
+
         def before?
-          false
+          type == :before
         end
 
         def after?
-          false
+          type == :after
         end
 
         def around?
-          true
+          type == :around
+        end
+
+        def run(controller)
+          raise ActionControllerError, 'No filter type: Nothing to do here.'
         end
 
         def call(controller, &amp;block)
-          raise(ActionControllerError, 'No filter type: Nothing to do here.')
+          run(controller)
         end
       end
 
@@ -420,35 +430,38 @@ module ActionController #:nodoc:
         def filter
           @filter.filter
         end
-
-        def around?
-          false
-        end
       end
 
       class BeforeFilterProxy &lt; FilterProxy #:nodoc:
-        def before?
-          true
+        def type
+          :before
         end
 
-        def call(controller, &amp;block)
-          if false == @filter.call(controller) # must only stop if equal to false. only filters returning false are halted.
-            controller.halt_filter_chain(@filter, :returned_false)
-          else
-            yield
+        def run(controller)
+          # only filters returning false are halted.
+          if false == @filter.call(controller)
+            controller.send :halt_filter_chain, @filter, :returned_false
           end
         end
+
+        def call(controller)
+          yield unless run(controller)
+        end
       end
 
       class AfterFilterProxy &lt; FilterProxy #:nodoc:
-        def after?
-          true
+        def type
+          :after
         end
 
-        def call(controller, &amp;block)
-          yield
+        def run(controller)
           @filter.call(controller)
         end
+
+        def call(controller)
+          yield
+          run(controller)
+        end
       end
 
       class SymbolFilter &lt; Filter #:nodoc:
@@ -485,29 +498,72 @@ module ActionController #:nodoc:
         end
       end
 
+      class ClassBeforeFilter &lt; Filter #:nodoc:
+        def call(controller, &amp;block)
+          @filter.before(controller)
+        end
+      end
+
+      class ClassAfterFilter &lt; Filter #:nodoc:
+        def call(controller, &amp;block)
+          @filter.after(controller)
+        end
+      end
+
       protected
-        def append_filter_to_chain(filters, position = :around, &amp;block)
-          write_inheritable_array('filter_chain', create_filters(filters, position, &amp;block) )
+        def append_filter_to_chain(filters, filter_type = :around, &amp;block)
+          pos = find_filter_append_position(filters, filter_type)
+          update_filter_chain(filters, filter_type, pos, &amp;block)
         end
 
-        def prepend_filter_to_chain(filters, position = :around, &amp;block)
-          write_inheritable_attribute('filter_chain', create_filters(filters, position, &amp;block) + filter_chain)
+        def prepend_filter_to_chain(filters, filter_type = :around, &amp;block)
+          pos = find_filter_prepend_position(filters, filter_type)
+          update_filter_chain(filters, filter_type, pos, &amp;block)
         end
 
-        def create_filters(filters, position, &amp;block) #:nodoc:
+        def update_filter_chain(filters, filter_type, pos, &amp;block)
+          new_filters = create_filters(filters, filter_type, &amp;block)
+          new_chain = filter_chain.insert(pos, new_filters).flatten
+          write_inheritable_attribute('filter_chain', new_chain)
+        end
+
+        def find_filter_append_position(filters, filter_type)
+          # appending an after filter puts it at the end of the call chain
+          # before and around filters go before the first after filter in the chain
+          unless filter_type == :after
+            filter_chain.each_with_index do |f,i|
+              return i if f.after?
+            end
+          end
+          return -1
+        end
+
+        def find_filter_prepend_position(filters, filter_type)
+          # prepending a before or around filter puts it at the front of the call chain
+          # after filters go before the first after filter in the chain
+          if filter_type == :after
+            filter_chain.each_with_index do |f,i|
+              return i if f.after?
+            end
+            return -1
+          end
+          return 0
+        end
+
+        def create_filters(filters, filter_type, &amp;block) #:nodoc:
           filters, conditions = extract_conditions(filters, &amp;block)
-          filters.map! { |filter| find_or_create_filter(filter,position) }
+          filters.map! { |filter| find_or_create_filter(filter, filter_type) }
           update_conditions(filters, conditions)
           filters
         end
 
-        def find_or_create_filter(filter,position)
-          if found_filter = find_filter(filter) { |f| f.send(&quot;#{position}?&quot;) }
+        def find_or_create_filter(filter, filter_type)
+          if found_filter = find_filter(filter) { |f| f.type == filter_type }
             found_filter
           else
-            f = class_for_filter(filter).new(filter)
+            f = class_for_filter(filter, filter_type).new(filter)
             # apply proxy to filter if necessary
-            case position
+            case filter_type
             when :before
               BeforeFilterProxy.new(f)
             when :after
@@ -520,7 +576,7 @@ module ActionController #:nodoc:
 
         # The determination of the filter type was once done at run time.
         # This method is here to extract as much logic from the filter run time as possible
-        def class_for_filter(filter) #:nodoc:
+        def class_for_filter(filter, filter_type) #:nodoc:
           case
           when filter.is_a?(Symbol)
             SymbolFilter
@@ -534,8 +590,12 @@ module ActionController #:nodoc:
             end
           when filter.respond_to?(:filter)
             ClassFilter
+          when filter.respond_to?(:before) &amp;&amp; filter_type == :before
+            ClassBeforeFilter
+          when filter.respond_to?(:after) &amp;&amp; filter_type == :after
+            ClassAfterFilter
           else
-            raise(ActionControllerError, 'A filters must be a Symbol, Proc, Method, or object responding to filter.')
+            raise(ActionControllerError, 'A filter must be a Symbol, Proc, Method, or object responding to filter, after or before.')
           end
         end
 
@@ -550,8 +610,8 @@ module ActionController #:nodoc:
           return if conditions.empty?
           if conditions[:only]
             write_inheritable_hash('included_actions', condition_hash(filters, conditions[:only]))
-          else
-            write_inheritable_hash('excluded_actions', condition_hash(filters, conditions[:except])) if conditions[:except]
+          elsif conditions[:except]
+            write_inheritable_hash('excluded_actions', condition_hash(filters, conditions[:except]))
           end
         end
 
@@ -576,9 +636,9 @@ module ActionController #:nodoc:
 
         def remove_actions_from_included_actions!(filters,*actions)
           actions = actions.flatten.map(&amp;:to_s)
-          updated_hash = filters.inject(included_actions) do |hash,filter|
+          updated_hash = filters.inject(read_inheritable_attribute('included_actions')||{}) do |hash,filter|
             ia = (hash[filter] || []) - actions
-            ia.blank? ? hash.delete(filter) : hash[filter] = ia
+            ia.empty? ? hash.delete(filter) : hash[filter] = ia
             hash
           end
           write_inheritable_attribute('included_actions', updated_hash)
@@ -595,7 +655,9 @@ module ActionController #:nodoc:
         def proxy_before_and_after_filter(filter) #:nodoc:
           return filter unless filter_responds_to_before_and_after(filter)
           Proc.new do |controller, action|
-            unless filter.before(controller) == false
+            if filter.before(controller) == false
+              controller.send :halt_filter_chain, filter, :returned_false
+            else
               begin
                 action.call
               ensure
@@ -615,53 +677,90 @@ module ActionController #:nodoc:
         end
       end
 
-      def perform_action_with_filters
-        call_filter(self.class.filter_chain, 0)
-      end
+      protected
 
       def process_with_filters(request, response, method = :perform_action, *arguments) #:nodoc:
         @before_filter_chain_aborted = false
         process_without_filters(request, response, method, *arguments)
       end
 
-      def filter_chain
-        self.class.filter_chain
+      def perform_action_with_filters
+        call_filters(self.class.filter_chain, 0, 0)
       end
 
-      def call_filter(chain, index)
-        return (performed? || perform_action_without_filters) if index &gt;= chain.size
-        filter = chain[index]
-        return call_filter(chain, index.next) if self.class.filter_excluded_from_action?(filter,action_name)
+      private
 
-        halted = false
-        filter.call(self) do
-          halted = call_filter(chain, index.next)
+      def call_filters(chain, index, nesting)
+        index = run_before_filters(chain, index, nesting)
+        aborted = @before_filter_chain_aborted
+        perform_action_without_filters unless performed? || aborted
+        return index if nesting != 0 || aborted
+        run_after_filters(chain, index)
+      end
+
+      def skip_excluded_filters(chain, index)
+        while (filter = chain[index]) &amp;&amp; self.class.filter_excluded_from_action?(filter, action_name)
+          index = index.next
         end
-        halt_filter_chain(filter.filter, :no_yield) if halted == false unless @before_filter_chain_aborted
-        halted
+        [filter, index]
       end
 
-      def halt_filter_chain(filter, reason)
-        if logger
-          case reason
-          when :no_yield
-            logger.info &quot;Filter chain halted as [#{filter.inspect}] did not yield.&quot;
-          when :returned_false
-            logger.info &quot;Filter chain halted as [#{filter.inspect}] returned false.&quot;
+      def run_before_filters(chain, index, nesting)
+        while chain[index]
+          filter, index = skip_excluded_filters(chain, index)
+          break unless filter # end of call chain reached
+          case filter.type
+          when :before
+            filter.run(self)  # invoke before filter
+            index = index.next
+            break if @before_filter_chain_aborted
+          when :around
+            yielded = false
+            filter.call(self) do
+              yielded = true
+              # all remaining before and around filters will be run in this call
+              index = call_filters(chain, index.next, nesting.next)
+            end
+            halt_filter_chain(filter, :did_not_yield) unless yielded
+            break
+          else
+            break  # no before or around filters left
           end
         end
-        @before_filter_chain_aborted = true
-        return false
+        index
       end
 
-      private
-        def process_cleanup_with_filters
-          if @before_filter_chain_aborted
-            close_session
+      def run_after_filters(chain, index)
+        seen_after_filter = false
+        while chain[index]
+          filter, index = skip_excluded_filters(chain, index)
+          break unless filter # end of call chain reached
+          case filter.type
+          when :after
+            seen_after_filter = true
+            filter.run(self)  # invoke after filter
           else
-            process_cleanup_without_filters
+            # implementation error or someone has mucked with the filter chain
+            raise ActionControllerError, &quot;filter #{filter.inspect} was in the wrong place!&quot; if seen_after_filter
           end
+          index = index.next
+        end
+        index.next
+      end
+
+      def halt_filter_chain(filter, reason)
+        @before_filter_chain_aborted = true
+        logger.info &quot;Filter chain halted as [#{filter.inspect}] #{reason}.&quot; if logger
+        false
+      end
+
+      def process_cleanup_with_filters
+        if @before_filter_chain_aborted
+          close_session
+        else
+          process_cleanup_without_filters
         end
+      end
     end
   end
 end</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/filters.rb</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,7 @@ module ActionController
         @https = false
         @cookies = {}
         @controller = @request = @response = nil
-      
+
         self.host        = &quot;www.example.com&quot;
         self.remote_addr = &quot;127.0.0.1&quot;
         self.accept      = &quot;text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&quot;
@@ -89,7 +89,7 @@ module ActionController
       #   session.https!
       #   session.https!(false)
       def https!(flag=true)
-        @https = flag        
+        @https = flag
       end
 
       # Return +true+ if the session is mimicing a secure HTTPS request.
@@ -143,10 +143,10 @@ module ActionController
       # Performs a GET request with the given parameters. The parameters may
       # be +nil+, a Hash, or a string that is appropriately encoded
       # (application/x-www-form-urlencoded or multipart/form-data).  The headers
-      # should be a hash.  The keys will automatically be upcased, with the 
+      # should be a hash.  The keys will automatically be upcased, with the
       # prefix 'HTTP_' added if needed.
       #
-      # You can also perform POST, PUT, DELETE, and HEAD requests with #post, 
+      # You can also perform POST, PUT, DELETE, and HEAD requests with #post,
       # #put, #delete, and #head.
       def get(path, parameters=nil, headers=nil)
         process :get, path, parameters, headers
@@ -161,31 +161,41 @@ module ActionController
       def put(path, parameters=nil, headers=nil)
         process :put, path, parameters, headers
       end
-      
+
       # Performs a DELETE request with the given parameters. See get() for more details.
       def delete(path, parameters=nil, headers=nil)
         process :delete, path, parameters, headers
       end
-      
+
       # Performs a HEAD request with the given parameters. See get() for more details.
       def head(path, parameters=nil, headers=nil)
         process :head, path, parameters, headers
       end
 
-      # Performs an XMLHttpRequest request with the given parameters, mimicing
-      # the request environment created by the Prototype library. The parameters
-      # may be +nil+, a Hash, or a string that is appropriately encoded
-      # (application/x-www-form-urlencoded or multipart/form-data).  The headers
-      # should be a hash.  The keys will automatically be upcased, with the 
-      # prefix 'HTTP_' added if needed.
-      def xml_http_request(path, parameters=nil, headers=nil)
-        headers = (headers || {}).merge(
-          &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
-          &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
-        )
+      # Performs an XMLHttpRequest request with the given parameters, mirroring
+      # a request from the Prototype library.
+      #
+      # The request_method is :get, :post, :put, :delete or :head; the
+      # parameters are +nil+, a hash, or a url-encoded or multipart string;
+      # the headers are a hash.  Keys are automatically upcased and prefixed
+      # with 'HTTP_' if not already.
+      #
+      # This method used to omit the request_method parameter, assuming it
+      # was :post. This was deprecated in Rails 1.2.4. Always pass the request
+      # method as the first argument.
+      def xml_http_request(request_method, path, parameters = nil, headers = nil)
+        unless request_method.is_a?(Symbol)
+          ActiveSupport::Deprecation.warn 'xml_http_request now takes the request_method (:get, :post, etc.) as the first argument. It used to assume :post, so add the :post argument to your existing method calls to silence this warning.'
+          request_method, path, parameters, headers = :post, request_method, path, parameters
+        end
+
+        headers ||= {}
+        headers['X-Requested-With'] = 'XMLHttpRequest'
+        headers['Accept'] = 'text/javascript, text/html, application/xml, text/xml, */*'
 
-        post(path, parameters, headers)
+        process(request_method, path, parameters, headers)
       end
+      alias xhr :xml_http_request
 
       # Returns the URL for the given options, according to the rules specified
       # in the application's routes.
@@ -292,7 +302,7 @@ module ActionController
           @status = @status.to_i
         end
 
-        # Encode the cookies hash in a format suitable for passing to a 
+        # Encode the cookies hash in a format suitable for passing to a
         # request.
         def encode_cookies
           cookies.inject(&quot;&quot;) do |string, (name, value)|
@@ -450,7 +460,7 @@ module ActionController
     # without any test methods.
     def run(*args) #:nodoc:
       return if @method_name == &quot;default_test&quot;
-      super   
+      super
     end
 
     # Because of how use_instantiated_fixtures and use_transactional_fixtures
@@ -490,7 +500,7 @@ module ActionController
       @integration_session = open_session
     end
 
-    %w(get post cookies assigns xml_http_request).each do |method|
+    %w(get post put head delete cookies assigns xml_http_request).each do |method|
       define_method(method) do |*args|
         reset! unless @integration_session
         # reset the html_document variable, but only for new get/post calls</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/integration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ module ActionController
           define_method(&quot;set_#{object}_#{attribute}&quot;) do
             @item = object.to_s.camelize.constantize.find(params[:id])
             @item.update_attribute(attribute, params[:value])
-            render :text =&gt; @item.send(attribute)
+            render :text =&gt; @item.send(attribute).to_s
           end
         end
       end</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/macros/in_place_editing.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,9 @@
 module ActionController
   # === Action Pack pagination for Active Record collections
   #
-  # DEPRECATION WARNING: Pagination will be separated into its own plugin with Rails 2.0.
+  # DEPRECATION WARNING: Pagination will be moved to a plugin in Rails 2.0.
+  # Install the classic_pagination plugin for forward compatibility:
+  #   script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination
   #
   # The Pagination module aids in the process of paging large collections of
   # Active Record objects. It offers macro-style automatic fetching of your
@@ -130,6 +132,8 @@ module ActionController
       paginator_and_collection_for(collection_id, options)
     end
 
+    deprecate :paginate =&gt; 'Pagination is moving to a plugin in Rails 2.0: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination'
+
     # These methods become class methods on any controller 
     module ClassMethods
       # Creates a +before_filter+ which automatically paginates an Active
@@ -148,6 +152,8 @@ module ActionController
           OPTIONS[self][collection_id] = options
         end
       end
+
+      deprecate :paginate =&gt; 'Pagination is moving to a plugin in Rails 2.0: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination'
     end
 
     def create_paginators_and_retrieve_collections #:nodoc:</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/pagination.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,10 +48,6 @@ module ActionController
     # REQUEST_METHOD header directly. Thus, for head, both get? and head? will return true.
     def head?
       @env['REQUEST_METHOD'].downcase.to_sym == :head
-    end 
-
-    def headers 
-      @env 
     end
 
     # Determine whether the body of a HTTP call is URL-encoded (default)</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,48 +2,68 @@ module ActionController
   module Resources
     class Resource #:nodoc:
       attr_reader :collection_methods, :member_methods, :new_methods
-      attr_reader :path_prefix, :name_prefix
+      attr_reader :path_prefix, :new_name_prefix
       attr_reader :plural, :singular
       attr_reader :options
 
       def initialize(entities, options)
         @plural   = entities
         @singular = options[:singular] || plural.to_s.singularize
-        
+
         @options = options
 
         arrange_actions
         add_default_actions
         set_prefixes
       end
-      
+
       def controller
         @controller ||= (options[:controller] || plural).to_s
       end
-      
+
       def path
         @path ||= &quot;#{path_prefix}/#{plural}&quot;
       end
-      
+
       def new_path
         @new_path ||= &quot;#{path}/new&quot;
       end
-      
+
       def member_path
         @member_path ||= &quot;#{path}/:id&quot;
       end
-      
+
       def nesting_path_prefix
         @nesting_path_prefix ||= &quot;#{path}/:#{singular}_id&quot;
       end
-      
+
+      def deprecate_name_prefix?
+        @name_prefix.blank? &amp;&amp; !@new_name_prefix.blank?
+      end
+
+      def name_prefix
+        deprecate_name_prefix? ? @new_name_prefix : @name_prefix
+      end
+
+      def old_name_prefix
+        @name_prefix
+      end
+
+      def nesting_name_prefix
+        &quot;#{new_name_prefix}#{singular}_&quot;
+      end
+
+      def action_separator
+        @action_separator ||= Base.resource_action_separator
+      end
+
       protected
         def arrange_actions
           @collection_methods = arrange_actions_by_methods(options.delete(:collection))
           @member_methods     = arrange_actions_by_methods(options.delete(:member))
           @new_methods        = arrange_actions_by_methods(options.delete(:new))
         end
-        
+
         def add_default_actions
           add_default_action(member_methods, :get, :edit)
           add_default_action(new_methods, :get, :new)
@@ -52,6 +72,7 @@ module ActionController
         def set_prefixes
           @path_prefix = options.delete(:path_prefix)
           @name_prefix = options.delete(:name_prefix)
+          @new_name_prefix = options.delete(:new_name_prefix)
         end
 
         def arrange_actions_by_methods(actions)
@@ -60,7 +81,7 @@ module ActionController
             flipped_hash
           end
         end
-        
+
         def add_default_action(collection, method, action)
           (collection[method] ||= []).unshift(action)
         end
@@ -178,11 +199,11 @@ module ActionController
     #
     #   The comment resources work the same, but must now include a value for :article_id.
     #   
-    #     comments_url(@article)
-    #     comment_url(@article, @comment)
+    #     article_comments_url(@article)
+    #     article_comment_url(@article, @comment)
     #
-    #     comments_url(:article_id =&gt; @article)
-    #     comment_url(:article_id =&gt; @article, :id =&gt; @comment)
+    #     article_comments_url(:article_id =&gt; @article)
+    #     article_comment_url(:article_id =&gt; @article, :id =&gt; @comment)
     #
     # * &lt;tt&gt;:name_prefix&lt;/tt&gt; -- define a prefix for all generated routes, usually ending in an underscore.
     #   Use this if you have named routes that may clash.
@@ -192,7 +213,7 @@ module ActionController
     #
     # * &lt;tt&gt;:collection&lt;/tt&gt; -- add named routes for other actions that operate on the collection.
     #   Takes a hash of &lt;tt&gt;#{action} =&gt; #{method}&lt;/tt&gt;, where method is &lt;tt&gt;:get&lt;/tt&gt;/&lt;tt&gt;:post&lt;/tt&gt;/&lt;tt&gt;:put&lt;/tt&gt;/&lt;tt&gt;:delete&lt;/tt&gt;
-    #   or &lt;tt&gt;:any&lt;/tt&gt; if the method does not matter.  These routes map to a URL like /messages;rss, with a route of rss_messages_url.
+    #   or &lt;tt&gt;:any&lt;/tt&gt; if the method does not matter.  These routes map to a URL like /messages/rss, with a route of rss_messages_url.
     # * &lt;tt&gt;:member&lt;/tt&gt; -- same as :collection, but for actions that operate on a specific member.
     # * &lt;tt&gt;:new&lt;/tt&gt; -- same as :collection, but for actions that operate on the new resource action.
     #
@@ -204,19 +225,19 @@ module ActionController
     #   # --&gt; GET /thread/7/messages/1
     #  
     #   map.resources :messages, :collection =&gt; { :rss =&gt; :get }
-    #   # --&gt; GET /messages;rss (maps to the #rss action)
+    #   # --&gt; GET /messages/rss (maps to the #rss action)
     #   #     also adds a named route called &quot;rss_messages&quot;
     # 
     #   map.resources :messages, :member =&gt; { :mark =&gt; :post }
-    #   # --&gt; POST /messages/1;mark (maps to the #mark action)
+    #   # --&gt; POST /messages/1/mark (maps to the #mark action)
     #   #     also adds a named route called &quot;mark_message&quot;
     # 
     #   map.resources :messages, :new =&gt; { :preview =&gt; :post }
-    #   # --&gt; POST /messages/new;preview (maps to the #preview action)
+    #   # --&gt; POST /messages/new/preview (maps to the #preview action)
     #   #     also adds a named route called &quot;preview_new_message&quot;
     # 
     #   map.resources :messages, :new =&gt; { :new =&gt; :any, :preview =&gt; :post }
-    #   # --&gt; POST /messages/new;preview (maps to the #preview action)
+    #   # --&gt; POST /messages/new/preview (maps to the #preview action)
     #   #     also adds a named route called &quot;preview_new_message&quot;
     #   # --&gt; /messages/new can be invoked via any request method
     # 
@@ -235,9 +256,10 @@ module ActionController
     # /account profile.
     # 
     # See map.resources for general conventions.  These are the main differences:
-    #   - a singular name is given to map.resource.  The default controller name is taken from the singular name.
-    #   - To specify a custom plural name, use the :plural option.  There is no :singular option
-    #   - No default index, new, or create routes are created for the singleton resource controller.
+    #   - A singular name is given to map.resource.  The default controller name is taken from the singular name.
+    #   - There is no &lt;tt&gt;:collection&lt;/tt&gt; option as there is only the singleton resource.
+    #   - There is no &lt;tt&gt;:singular&lt;/tt&gt; option as the singular name is passed to map.resource.
+    #   - No default index route is created for the singleton resource controller.
     #   - When nesting singleton resources, only the singular name is used as the path prefix (example: 'account/messages/1')
     #
     # Example:
@@ -300,7 +322,7 @@ module ActionController
           map_member_actions(map, resource)
 
           if block_given?
-            with_options(:path_prefix =&gt; resource.nesting_path_prefix, &amp;block)
+            with_options(:path_prefix =&gt; resource.nesting_path_prefix, :new_name_prefix =&gt; resource.nesting_name_prefix, &amp;block)
           end
         end
       end
@@ -315,7 +337,7 @@ module ActionController
           map_member_actions(map, resource)
 
           if block_given?
-            with_options(:path_prefix =&gt; resource.nesting_path_prefix, &amp;block)
+            with_options(:path_prefix =&gt; resource.nesting_path_prefix, :new_name_prefix =&gt; resource.nesting_name_prefix, &amp;block)
           end
         end
       end
@@ -324,8 +346,21 @@ module ActionController
         resource.collection_methods.each do |method, actions|
           actions.each do |action|
             action_options = action_options_for(action, resource, method)
-            map.named_route(&quot;#{resource.name_prefix}#{action}_#{resource.plural}&quot;, &quot;#{resource.path};#{action}&quot;, action_options)
-            map.named_route(&quot;formatted_#{resource.name_prefix}#{action}_#{resource.plural}&quot;, &quot;#{resource.path}.:format;#{action}&quot;, action_options)
+
+            unless resource.old_name_prefix.blank?
+              map.deprecated_named_route(&quot;#{action}_#{resource.name_prefix}#{resource.plural}&quot;, &quot;#{resource.old_name_prefix}#{action}_#{resource.plural}&quot;)
+              map.deprecated_named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.plural}&quot;, &quot;formatted_#{resource.old_name_prefix}#{action}_#{resource.plural}&quot;)
+            end
+
+            if resource.deprecate_name_prefix?
+              map.deprecated_named_route(&quot;#{action}_#{resource.name_prefix}#{resource.plural}&quot;, &quot;#{action}_#{resource.plural}&quot;)
+              map.deprecated_named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.plural}&quot;, &quot;formatted_#{action}_#{resource.plural}&quot;)
+            end
+
+            map.named_route(&quot;#{action}_#{resource.name_prefix}#{resource.plural}&quot;, &quot;#{resource.path}#{resource.action_separator}#{action}&quot;, action_options)
+            map.connect(&quot;#{resource.path};#{action}&quot;, action_options)
+            map.connect(&quot;#{resource.path}.:format;#{action}&quot;, action_options)
+            map.named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.plural}&quot;, &quot;#{resource.path}#{resource.action_separator}#{action}.:format&quot;, action_options)
           end
         end
       end
@@ -335,6 +370,11 @@ module ActionController
         map.named_route(&quot;#{resource.name_prefix}#{resource.plural}&quot;, resource.path, index_action_options)
         map.named_route(&quot;formatted_#{resource.name_prefix}#{resource.plural}&quot;, &quot;#{resource.path}.:format&quot;, index_action_options)
 
+        if resource.deprecate_name_prefix?
+          map.deprecated_named_route(&quot;#{resource.name_prefix}#{resource.plural}&quot;, &quot;#{resource.plural}&quot;)
+          map.deprecated_named_route(&quot;formatted_#{resource.name_prefix}#{resource.plural}&quot;, &quot;formatted_#{resource.plural}&quot;)
+        end
+
         create_action_options = action_options_for(&quot;create&quot;, resource)
         map.connect(resource.path, create_action_options)
         map.connect(&quot;#{resource.path}.:format&quot;, create_action_options)
@@ -351,11 +391,37 @@ module ActionController
           actions.each do |action|
             action_options = action_options_for(action, resource, method)
             if action == :new
-              map.named_route(&quot;#{resource.name_prefix}new_#{resource.singular}&quot;, resource.new_path, action_options)
-              map.named_route(&quot;formatted_#{resource.name_prefix}new_#{resource.singular}&quot;, &quot;#{resource.new_path}.:format&quot;, action_options)
+
+              unless resource.old_name_prefix.blank?
+                map.deprecated_named_route(&quot;new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.old_name_prefix}new_#{resource.singular}&quot;)
+                map.deprecated_named_route(&quot;formatted_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_#{resource.old_name_prefix}new_#{resource.singular}&quot;)
+              end
+
+              if resource.deprecate_name_prefix?
+                map.deprecated_named_route(&quot;new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;new_#{resource.singular}&quot;)
+                map.deprecated_named_route(&quot;formatted_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_new_#{resource.singular}&quot;)
+              end
+
+              map.named_route(&quot;new_#{resource.name_prefix}#{resource.singular}&quot;, resource.new_path, action_options)
+              map.named_route(&quot;formatted_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.new_path}.:format&quot;, action_options)
+
             else
-              map.named_route(&quot;#{resource.name_prefix}#{action}_new_#{resource.singular}&quot;, &quot;#{resource.new_path};#{action}&quot;, action_options)
-              map.named_route(&quot;formatted_#{resource.name_prefix}#{action}_new_#{resource.singular}&quot;, &quot;#{resource.new_path}.:format;#{action}&quot;, action_options)
+
+              unless resource.old_name_prefix.blank?
+                map.deprecated_named_route(&quot;#{action}_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.old_name_prefix}#{action}_new_#{resource.singular}&quot;)
+                map.deprecated_named_route(&quot;formatted_#{action}_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_#{resource.old_name_prefix}#{action}_new_#{resource.singular}&quot;)
+              end
+
+              if resource.deprecate_name_prefix?
+                map.deprecated_named_route(&quot;#{action}_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{action}_new_#{resource.singular}&quot;)
+                map.deprecated_named_route(&quot;formatted_#{action}_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_#{action}_new_#{resource.singular}&quot;)
+              end
+
+              map.named_route(&quot;#{action}_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.new_path}#{resource.action_separator}#{action}&quot;, action_options)
+              map.connect(&quot;#{resource.new_path};#{action}&quot;, action_options)
+              map.connect(&quot;#{resource.new_path}.:format;#{action}&quot;, action_options)
+              map.named_route(&quot;formatted_#{action}_new_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.new_path}#{resource.action_separator}#{action}.:format&quot;, action_options)
+
             end
           end
         end
@@ -365,8 +431,22 @@ module ActionController
         resource.member_methods.each do |method, actions|
           actions.each do |action|
             action_options = action_options_for(action, resource, method)
-            map.named_route(&quot;#{resource.name_prefix}#{action}_#{resource.singular}&quot;, &quot;#{resource.member_path};#{action}&quot;, action_options)
-            map.named_route(&quot;formatted_#{resource.name_prefix}#{action}_#{resource.singular}&quot;, &quot;#{resource.member_path}.:format;#{action}&quot;,action_options)
+
+            unless resource.old_name_prefix.blank?
+              map.deprecated_named_route(&quot;#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.old_name_prefix}#{action}_#{resource.singular}&quot;)
+              map.deprecated_named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_#{resource.old_name_prefix}#{action}_#{resource.singular}&quot;)
+            end
+
+            if resource.deprecate_name_prefix?
+              map.deprecated_named_route(&quot;#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{action}_#{resource.singular}&quot;)
+              map.deprecated_named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_#{action}_#{resource.singular}&quot;)
+            end
+
+            map.named_route(&quot;#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action}&quot;, action_options)
+            map.connect(&quot;#{resource.member_path};#{action}&quot;, action_options)
+            map.connect(&quot;#{resource.member_path}.:format;#{action}&quot;, action_options)
+            map.named_route(&quot;formatted_#{action}_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}#{resource.action_separator}#{action}.:format&quot;, action_options)
+
           end
         end
 
@@ -374,6 +454,11 @@ module ActionController
         map.named_route(&quot;#{resource.name_prefix}#{resource.singular}&quot;, resource.member_path, show_action_options)
         map.named_route(&quot;formatted_#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.member_path}.:format&quot;, show_action_options)
 
+        if resource.deprecate_name_prefix?
+          map.deprecated_named_route(&quot;#{resource.name_prefix}#{resource.singular}&quot;, &quot;#{resource.singular}&quot;)
+          map.deprecated_named_route(&quot;formatted_#{resource.name_prefix}#{resource.singular}&quot;, &quot;formatted_#{resource.singular}&quot;)
+        end
+
         update_action_options = action_options_for(&quot;update&quot;, resource)
         map.connect(resource.member_path, update_action_options)
         map.connect(&quot;#{resource.member_path}.:format&quot;, update_action_options)</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/resources.rb</filename>
    </modified>
    <modified>
      <diff>@@ -451,26 +451,17 @@ module ActionController
       # is given (as an array), only the keys indicated will be used to build
       # the query string. The query string will correctly build array parameter
       # values.
-      def build_query_string(hash, only_keys=nil)
+      def build_query_string(hash, only_keys = nil)
         elements = []
-
-        only_keys ||= hash.keys
-        
-        only_keys.each do |key|
-          value = hash[key] or next
-          key = CGI.escape key.to_s
-          if value.class == Array
-            key &lt;&lt;  '[]'
-          else    
-            value = [ value ] 
-          end     
-          value.each { |val| elements &lt;&lt; &quot;#{key}=#{CGI.escape(val.to_param.to_s)}&quot; }
-        end     
         
-        query_string = &quot;?#{elements.join(&quot;&amp;&quot;)}&quot; unless elements.empty?
-        query_string || &quot;&quot;
+        (only_keys || hash.keys).each do |key|
+          if value = hash[key]
+            elements &lt;&lt; value.to_query(key)
+          end
+        end
+        elements.empty? ? '' : &quot;?#{elements.sort * '&amp;'}&quot;
       end
-  
+
       # Write the real recognition implementation and then resend the message.
       def recognize(path, environment={})
         write_recognition
@@ -668,7 +659,7 @@ module ActionController
       end
   
       def extract_value
-        &quot;#{local_name} = hash[:#{key}] #{&quot;|| #{default.inspect}&quot; if default}&quot;
+        &quot;#{local_name} = hash[:#{key}] &amp;&amp; hash[:#{key}].to_param #{&quot;|| #{default.inspect}&quot; if default}&quot;
       end
       def value_check
         if default # Then we know it won't be nil
@@ -989,6 +980,10 @@ module ActionController
         def named_route(name, path, options = {})
           @set.add_named_route(name, path, options)
         end
+        
+        def deprecated_named_route(name, deprecated_name, options = {})
+          @set.add_deprecated_named_route(name, deprecated_name)
+        end
 
         # Added deprecation notice for anyone who already added a named route called &quot;root&quot;.
         # It'll be used as a shortcut for map.connect '' in Rails 2.0.
@@ -1019,7 +1014,7 @@ module ActionController
         def clear!
           @routes = {}
           @helpers = []
-          
+
           @module ||= Module.new
           @module.instance_methods.each do |selector|
             @module.send :remove_method, selector
@@ -1055,6 +1050,38 @@ module ActionController
         def install(destinations = [ActionController::Base, ActionView::Base])
           Array(destinations).each { |dest| dest.send :include, @module }
         end
+        
+        def define_deprecated_named_route_methods(name, deprecated_name)
+
+          [:url, :path].each do |kind|
+            @module.send :module_eval, &lt;&lt;-end_eval # We use module_eval to avoid leaks
+
+              def #{url_helper_name(deprecated_name, kind)}(*args)
+
+                ActiveSupport::Deprecation.warn(
+                  'The named route &quot;#{url_helper_name(deprecated_name, kind)}&quot; uses a format that has been deprecated. ' +
+                  'You should use &quot;#{url_helper_name(name, kind)}&quot; instead.', caller
+                )
+
+                send :#{url_helper_name(name, kind)}, *args
+
+              end
+
+              def #{hash_access_name(deprecated_name, kind)}(*args)
+
+                ActiveSupport::Deprecation.warn(
+                  'The named route &quot;#{hash_access_name(deprecated_name, kind)}&quot; uses a format that has been deprecated. ' +
+                  'You should use &quot;#{hash_access_name(name, kind)}&quot; instead.', caller
+                )
+
+                send :#{hash_access_name(name, kind)}, *args
+
+              end
+
+            end_eval
+          end
+
+        end
 
         private
           def url_helper_name(name, kind = :url)
@@ -1177,6 +1204,10 @@ module ActionController
       def add_named_route(name, path, options = {})
         named_routes[name] = add_route(path, options)
       end
+      
+      def add_deprecated_named_route(name, deprecated_name)
+        named_routes.define_deprecated_named_route_methods(name, deprecated_name)
+      end
   
       def options_as_params(options)
         # If an explicit :controller was given, always make :action explicit
@@ -1190,10 +1221,9 @@ module ActionController
         #
         # great fun, eh?
 
-        options_as_params = options[:controller] ? { :action =&gt; &quot;index&quot; } : {}
-        options.each do |k, value|
-          options_as_params[k] = value.to_param
-        end
+        options_as_params = options.clone
+        options_as_params[:action] ||= 'index' if options[:controller]
+        options_as_params[:action] = options_as_params[:action].to_s if options_as_params[:action]
         options_as_params
       end
   
@@ -1224,6 +1254,9 @@ module ActionController
         options = options_as_params(options)
         expire_on = build_expiry(options, recall)
 
+        if options[:controller]
+          options[:controller] = options[:controller].to_s
+        end
         # if the controller has changed, make sure it changes relative to the
         # current controller module, if any. In other words, if we're currently
         # on admin/get, and the new controller is 'set', the new controller</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/routing.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,6 +24,7 @@ module ActionController #:nodoc:
     attr_accessor :cookies, :session_options
     attr_accessor :query_parameters, :request_parameters, :path, :session, :env
     attr_accessor :host
+    attr_reader   :request_uri_overridden
 
     def initialize(query_parameters = nil, request_parameters = nil, session = nil)
       @query_parameters   = query_parameters || {}
@@ -67,12 +68,14 @@ module ActionController #:nodoc:
     # Used to check AbstractRequest's request_uri functionality.
     # Disables the use of @path and @request_uri so superclass can handle those.
     def set_REQUEST_URI(value)
+      @request_uri_overridden = true
       @env[&quot;REQUEST_URI&quot;] = value
       @request_uri = nil
       @path = nil
     end
 
     def request_uri=(uri)
+      @env[&quot;REQUEST_URI&quot;] = uri
       @request_uri = uri
       @path = uri.split(&quot;?&quot;).first
     end
@@ -426,12 +429,12 @@ module ActionController #:nodoc:
     end
 
     def build_request_uri(action, parameters)
-      unless @request.env['REQUEST_URI']
+      unless @request.request_uri_overridden
         options = @controller.send(:rewrite_options, parameters)
         options.update(:only_path =&gt; true, :action =&gt; action)
 
         url = ActionController::UrlRewriter.new(@request, parameters)
-        @request.set_REQUEST_URI(url.rewrite(options))
+        @request.request_uri = url.rewrite(options)
       end
     end
 </diff>
      <filename>vendor/rails/actionpack/lib/action_controller/test_process.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,8 +52,9 @@ module ActionController
         # Delete the unused options to prevent their appearance in the query string
         [:protocol, :host, :port].each { |k| options.delete k }
       end
+      anchor = &quot;##{options.delete(:anchor)}&quot; if options.key?(:anchor)
       url &lt;&lt; Routing::Routes.generate(options, {})
-      return url
+      return &quot;#{url}#{anchor}&quot;
     end
     
   end
@@ -76,6 +77,7 @@ module ActionController
     alias_method :to_s, :to_str
 
     private
+      # Given a path and options, returns a rewritten URL string
       def rewrite_url(path, options)
         rewritten_url = &quot;&quot;
         unless options[:only_path]
@@ -91,6 +93,7 @@ module ActionController
         rewritten_url
       end
 
+      # Given a Hash of options, generates a route
       def rewrite_path(options)
         options = options.symbolize_keys
         options.update(options[:params].symbolize_keys) if options[:params]</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/url_rewriter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -95,6 +95,7 @@ module ActionController #:nodoc:
         response.headers.update(options[:add_headers]) if options[:add_headers]
         unless performed?
           render(options[:render]) if options[:render]
+          options[:redirect_to] = self.send(options[:redirect_to]) if options[:redirect_to].is_a? Symbol
           redirect_to(options[:redirect_to]) if options[:redirect_to]
         end
         return false</diff>
      <filename>vendor/rails/actionpack/lib/action_controller/verification.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module ActionPack #:nodoc:
   module VERSION #:nodoc:
     MAJOR = 1
     MINOR = 13
-    TINY  = 3
+    TINY  = 5
     
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>vendor/rails/actionpack/lib/action_pack/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -148,7 +148,7 @@ module ActionView #:nodoc:
   #
   # This refreshes the sidebar, removes a person element and highlights the user list.
   # 
-  # See the ActionView::Helpers::PrototypeHelper::JavaScriptGenerator documentation for more details.
+  # See the ActionView::Helpers::PrototypeHelper::GeneratorMethods documentation for more details.
   class Base
     include ERB::Util
 
@@ -160,7 +160,7 @@ module ActionView #:nodoc:
     attr_internal *ActionController::Base::DEPRECATED_INSTANCE_VARIABLES
 
     # Specify trim mode for the ERB compiler. Defaults to '-'.
-    # See ERB documentation for suitable values.
+    # See ERb documentation for suitable values.
     @@erb_trim_mode = '-'
     cattr_accessor :erb_trim_mode
 
@@ -191,17 +191,17 @@ module ActionView #:nodoc:
     end
     include CompiledTemplates
 
-    # maps inline templates to their method names 
+    # Maps inline templates to their method names 
     @@method_names = {}
-    # map method names to their compile time
+    # Map method names to their compile time
     @@compile_time = {}
-    # map method names to the names passed in local assigns so far
+    # Map method names to the names passed in local assigns so far
     @@template_args = {}
-    # count the number of inline templates
+    # Count the number of inline templates
     @@inline_template_count = 0
-    # maps template paths without extension to their file extension returned by pick_template_extension.
-    # if for a given path, path.ext1 and path.ext2 exist on the file system, the order of extensions
-    # used by pick_template_extension determines whether ext1 or ext2 will be stored
+    # Maps template paths without extension to their file extension returned by pick_template_extension.
+    # If for a given path, path.ext1 and path.ext2 exist on the file system, the order of extensions
+    # used by pick_template_extension determines whether ext1 or ext2 will be stored.
     @@cached_template_extension = {}
 
     class ObjectWrapper &lt; Struct.new(:value) #:nodoc:
@@ -305,7 +305,6 @@ module ActionView #:nodoc:
     # Render the provided template with the given local assigns. If the template has not been rendered with the provided
     # local assigns yet, or if the template has been updated on disk, then the template will be compiled to a method.
     #
-
     # Either, but not both, of template and file_path may be nil. If file_path is given, the template
     # will only be read if it has to be compiled.
     #
@@ -371,10 +370,12 @@ module ActionView #:nodoc:
     end
 
     private
+      # Builds a string holding the full path of the template including extension
       def full_template_path(template_path, extension)
         &quot;#{@base_path}/#{template_path}.#{extension}&quot;
       end
 
+      # Asserts the existence of a template.
       def template_exists?(template_path, extension)
         file_path = full_template_path(template_path, extension)
         @@method_names.has_key?(file_path) || FileTest.exists?(file_path)
@@ -389,6 +390,7 @@ module ActionView #:nodoc:
         @@cache_template_extensions &amp;&amp; @@cached_template_extension[template_path]
       end
 
+      # Determines the template's file extension, such as rhtml, rxml, or rjs.
       def find_template_extension_for(template_path)
         if match = delegate_template_exists?(template_path)
           match.first.to_sym
@@ -405,6 +407,7 @@ module ActionView #:nodoc:
         File.read(template_path)
       end
 
+      # Evaluate the local assigns and pushes them to the view.
       def evaluate_assigns
         unless @assigns_added
           assign_variables_from_controller
@@ -416,6 +419,7 @@ module ActionView #:nodoc:
         handler.new(self).render(template, local_assigns)
       end
 
+      # Assigns instance variables from the controller to the view.
       def assign_variables_from_controller
         @assigns.each { |key, value| instance_variable_set(&quot;@#{key}&quot;, value) }
       end
@@ -427,10 +431,10 @@ module ActionView #:nodoc:
           ((args = @@template_args[render_symbol]) &amp;&amp; local_assigns.all? { |k,_| args.has_key?(k) })
       end
 
-      # Check whether compilation is necessary.
-      # Compile if the inline template or file has not been compiled yet.
-      # Or if local_assigns has a new key, which isn't supported by the compiled code yet.
-      # Or if the file has changed on disk and checking file mods hasn't been disabled. 
+      # Method to check whether template compilation is necessary.
+      # The template will be compiled if the inline template or file has not been compiled yet,
+      # if local_assigns has a new key, which isn't supported by the compiled code yet,
+      # or if the file has changed on disk and checking file mods hasn't been disabled.
       def compile_template?(template, file_name, local_assigns)
         method_key    = file_name || template
         render_symbol = @@method_names[method_key]
@@ -445,14 +449,15 @@ module ActionView #:nodoc:
         end
       end
 
-      # Create source code for given template
+      # Method to create the source code for a given template.
       def create_template_source(extension, template, render_symbol, locals)
         if template_requires_setup?(extension)
           body = case extension.to_sym
             when :rxml
               &quot;controller.response.content_type ||= 'application/xml'\n&quot; +
-              &quot;xml = Builder::XmlMarkup.new(:indent =&gt; 2)\n&quot; +
-              template
+              &quot;xml ||= Builder::XmlMarkup.new(:indent =&gt; 2)\n&quot; +
+              template +
+              &quot;\nxml.target!\n&quot;
             when :rjs
               &quot;controller.response.content_type ||= 'text/javascript'\n&quot; +
               &quot;update_page do |page|\n#{template}\nend&quot;
@@ -473,11 +478,11 @@ module ActionView #:nodoc:
         &quot;def #{render_symbol}(local_assigns)\n#{locals_code}#{body}\nend&quot;
       end
 
-      def template_requires_setup?(extension)
+      def template_requires_setup?(extension) #:nodoc:
         templates_requiring_setup.include? extension.to_s
       end
 
-      def templates_requiring_setup
+      def templates_requiring_setup #:nodoc:
         %w(rxml rjs)
       end
 
@@ -501,6 +506,7 @@ module ActionView #:nodoc:
         end
       end
 
+      # Compile and evaluate the template's code
       def compile_template(extension, template, file_name, local_assigns)
         render_symbol = assign_method_name(extension, template, file_name)
         render_source = create_template_source(extension, template, render_symbol, local_assigns.keys)</diff>
      <filename>vendor/rails/actionpack/lib/action_view/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,14 +3,14 @@ module ActionView
 
   # CompiledTemplates modules hold methods that have been compiled.
   # Templates are compiled into these methods so that they do not need to be
-  # re-read and re-parsed each request.
+  # read and parsed for each request.
   #
   # Each template may be compiled into one or more methods. Each method accepts a given
   # set of parameters which is used to implement local assigns passing.
   #
   # To use a compiled template module, create a new instance and include it into the class
   # in which you want the template to be rendered.
-  class CompiledTemplates &lt; Module #:nodoc:
+  class CompiledTemplates &lt; Module
     attr_reader :method_names
 
     def initialize</diff>
      <filename>vendor/rails/actionpack/lib/action_view/compiled_templates.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,17 +13,18 @@ module ActionView
     # is a great of making the record quickly available for editing, but likely to prove lackluster for a complicated real-world form.
     # In that case, it's better to use the input method and the specialized form methods in link:classes/ActionView/Helpers/FormHelper.html
     module ActiveRecordHelper
-      # Returns a default input tag for the type of object returned by the method. Example
-      # (title is a VARCHAR column and holds &quot;Hello World&quot;):
+      # Returns a default input tag for the type of object returned by the method. For example, let's say you have a model
+      # that has an attribute +title+ of type VARCHAR column, and this instance holds &quot;Hello World&quot;:
       #   input(&quot;post&quot;, &quot;title&quot;) =&gt;
       #     &lt;input id=&quot;post_title&quot; name=&quot;post[title]&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;Hello World&quot; /&gt;
       def input(record_name, method, options = {})
         InstanceTag.new(record_name, method, self).to_tag(options)
       end
 
-      # Returns an entire form with input tags and everything for a specified Active Record object. Example
-      # (post is a new record that has a title using VARCHAR and a body using TEXT):
-      #   form(&quot;post&quot;) =&gt;
+      # Returns an entire form with all needed input tags for a specified Active Record object. For example, let's say you 
+      # have a table model &lt;tt&gt;Post&lt;/tt&gt; with attributes named &lt;tt&gt;title&lt;/tt&gt; of type &lt;tt&gt;VARCHAR&lt;/tt&gt; and &lt;tt&gt;body&lt;/tt&gt; of type &lt;tt&gt;TEXT&lt;/tt&gt;:
+      #   form(&quot;post&quot;) 
+      # That line would yield a form like the following:
       #     &lt;form action='/post/create' method='post'&gt;
       #       &lt;p&gt;
       #         &lt;label for=&quot;post_title&quot;&gt;Title&lt;/label&gt;&lt;br /&gt;
@@ -32,14 +33,13 @@ module ActionView
       #       &lt;p&gt;
       #         &lt;label for=&quot;post_body&quot;&gt;Body&lt;/label&gt;&lt;br /&gt;
       #         &lt;textarea cols=&quot;40&quot; id=&quot;post_body&quot; name=&quot;post[body]&quot; rows=&quot;20&quot;&gt;
-      #           Back to the hill and over it again!
       #         &lt;/textarea&gt;
       #       &lt;/p&gt;
       #       &lt;input type='submit' value='Create' /&gt;
       #     &lt;/form&gt;
       #
       # It's possible to specialize the form builder by using a different action name and by supplying another
-      # block renderer. Example (entry is a new record that has a message attribute using VARCHAR):
+      # block renderer. For example, let's say you have a model &lt;tt&gt;Entry&lt;/tt&gt; with an attribute &lt;tt&gt;message&lt;/tt&gt; of type &lt;tt&gt;VARCHAR&lt;/tt&gt;:
       #
       #   form(&quot;entry&quot;, :action =&gt; &quot;sign&quot;, :input_block =&gt;
       #        Proc.new { |record, column| &quot;#{column.human_name}: #{input(record, column.name)}&lt;br /&gt;&quot; }) =&gt;
@@ -74,16 +74,16 @@ module ActionView
         content_tag('form', contents, :action =&gt; action, :method =&gt; 'post', :enctype =&gt; options[:multipart] ? 'multipart/form-data': nil)
       end
 
-      # Returns a string containing the error message attached to the +method+ on the +object+, if one exists.
-      # This error message is wrapped in a DIV tag, which can be specialized to include both a +prepend_text+ and +append_text+
-      # to properly introduce the error and a +css_class+ to style it accordingly. Examples (post has an error message
-      # &quot;can't be empty&quot; on the title attribute):
+      # Returns a string containing the error message attached to the +method+ on the +object+ if one exists.
+      # This error message is wrapped in a &lt;tt&gt;DIV&lt;/tt&gt; tag, which can be extended to include a +prepend_text+ and/or +append_text+
+      # (to properly explain the error), and a +css_class+ to style it accordingly. As an example, let's say you have a model
+      # +post+ that has an error message on the +title+ attribute:
       #
       #   &lt;%= error_message_on &quot;post&quot;, &quot;title&quot; %&gt; =&gt;
       #     &lt;div class=&quot;formError&quot;&gt;can't be empty&lt;/div&gt;
       #
-      #   &lt;%= error_message_on &quot;post&quot;, &quot;title&quot;, &quot;Title simply &quot;, &quot; (or it won't work)&quot;, &quot;inputError&quot; %&gt; =&gt;
-      #     &lt;div class=&quot;inputError&quot;&gt;Title simply can't be empty (or it won't work)&lt;/div&gt;
+      #   &lt;%= error_message_on &quot;post&quot;, &quot;title&quot;, &quot;Title simply &quot;, &quot; (or it won't work).&quot;, &quot;inputError&quot; %&gt; =&gt;
+      #     &lt;div class=&quot;inputError&quot;&gt;Title simply can't be empty (or it won't work).&lt;/div&gt;
       def error_message_on(object, method, prepend_text = &quot;&quot;, append_text = &quot;&quot;, css_class = &quot;formError&quot;)
         if (obj = instance_variable_get(&quot;@#{object}&quot;)) &amp;&amp; (errors = obj.errors.on(method))
           content_tag(&quot;div&quot;, &quot;#{prepend_text}#{errors.is_a?(Array) ? errors.first : errors}#{append_text}&quot;, :class =&gt; css_class)
@@ -92,11 +92,11 @@ module ActionView
         end
       end
 
-      # Returns a string with a div containing all of the error messages for the objects located as instance variables by the names
+      # Returns a string with a &lt;tt&gt;DIV&lt;/tt&gt; containing all of the error messages for the objects located as instance variables by the names
       # given.  If more than one object is specified, the errors for the objects are displayed in the order that the object names are
       # provided.
       #
-      # This div can be tailored by the following options:
+      # This &lt;tt&gt;DIV&lt;/tt&gt; can be tailored by the following options:
       #
       # * &lt;tt&gt;header_tag&lt;/tt&gt; - Used for the header of the error div (default: h2)
       # * &lt;tt&gt;id&lt;/tt&gt; - The id of the error div (default: errorExplanation)
@@ -105,12 +105,12 @@ module ActionView
       # any text that you prefer. If &lt;tt&gt;object_name&lt;/tt&gt; is not set, the name of
       # the first object will be used.
       #
-      # Specifying one object:
+      # To specify the display for one object, you simply provide its name as a parameter.  For example, for the +User+ model:
       # 
       #   error_messages_for 'user'
       #
-      # Specifying more than one object (and using the name 'user' in the
-      # header as the &lt;tt&gt;object_name&lt;/tt&gt; instead of 'user_common'):
+      # To specify more than one object, you simply list them; optionally, you can add an extra +object_name+ parameter, which
+      # be the name in the header.
       #
       #   error_messages_for 'user_common', 'user', :object_name =&gt; 'user'
       #</diff>
      <filename>vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,16 @@ module ActionView
     # Provides a set of methods for making it easier to locate problems.
     module DebugHelper
       # Returns a &lt;pre&gt;-tag set with the +object+ dumped by YAML. Very readable way to inspect an object.
+      #  my_hash = {'first' =&gt; 1, 'second' =&gt; 'two', 'third' =&gt; [1,2,3]}
+      #  debug(my_hash)
+      #  =&gt; &lt;pre class='debug_dump'&gt;--- 
+      #  first: 1
+      #  second: two
+      #  third: 
+      #  - 1
+      #  - 2
+      #  - 3
+      #  &lt;/pre&gt;
       def debug(object)
         begin
           Marshal::dump(object)</diff>
      <filename>vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,9 @@ module ActionView
   module Helpers
     module PrototypeHelper
 
+      # Method to execute an element update using Prototype.
+      # DEPRECATION WARNING: This helper has been depercated; use RJS instead.
+      # See ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods for more information.
       def update_element_function(element_id, options = {}, &amp;block)
         content = escape_javascript(options[:content] || '')
         content = escape_javascript(capture(&amp;block)) if block</diff>
      <filename>vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -250,8 +250,10 @@ module ActionView
         return function
       end
 
-      # Observes the field with the DOM ID specified by +field_id+ and makes
-      # an Ajax call when its contents have changed.
+      # Observes the field with the DOM ID specified by +field_id+ and calls a
+      # callback when its contents have changed. The default callback is an
+      # Ajax call. By default the value of the observed field is sent as a
+      # parameter with the Ajax call.
       # 
       # Required +options+ are either of:
       # &lt;tt&gt;:url&lt;/tt&gt;::       +url_for+-style options for the action to call
@@ -268,14 +270,24 @@ module ActionView
       # &lt;tt&gt;:update&lt;/tt&gt;::    Specifies the DOM ID of the element whose 
       #                       innerHTML should be updated with the
       #                       XMLHttpRequest response text.
-      # &lt;tt&gt;:with&lt;/tt&gt;::      A JavaScript expression specifying the
-      #                       parameters for the XMLHttpRequest. This defaults
-      #                       to 'value', which in the evaluated context 
-      #                       refers to the new field value. If you specify a
-      #                       string without a &quot;=&quot;, it'll be extended to mean
-      #                       the form key that the value should be assigned to.
-      #                       So :with =&gt; &quot;term&quot; gives &quot;'term'=value&quot;. If a &quot;=&quot; is
-      #                       present, no extension will happen.
+      # &lt;tt&gt;:with&lt;/tt&gt;::      A JavaScript expression specifying the parameters
+      #                       for the XMLHttpRequest. The default is to send the
+      #                       key and value of the observed field. Any custom
+      #                       expressions should return a valid URL query string.
+      #                       The value of the field is stored in the JavaScript
+      #                       variable +value+.
+      #
+      #                       Examples
+      #                       
+      #                         :with =&gt; &quot;'my_custom_key=' + value&quot;
+      #                         :with =&gt; &quot;'person[name]=' + prompt('New name')&quot;
+      #                         :with =&gt; &quot;Form.Element.serialize('other-field')&quot;
+      #
+      #                       Finally
+      #                         :with =&gt; 'name'
+      #                       is shorthand for
+      #                         :with =&gt; &quot;'name=' + value&quot;
+      #                       This essentially just changes the key of the parameter.
       # &lt;tt&gt;:on&lt;/tt&gt;::        Specifies which event handler to observe. By default,
       #                       it's set to &quot;changed&quot; for text fields and areas and
       #                       &quot;click&quot; for radio buttons and checkboxes. With this,
@@ -291,11 +303,15 @@ module ActionView
           build_observer('Form.Element.EventObserver', field_id, options)
         end
       end
-      
-      # Like +observe_field+, but operates on an entire form identified by the
-      # DOM ID +form_id+. +options+ are the same as +observe_field+, except 
-      # the default value of the &lt;tt&gt;:with&lt;/tt&gt; option evaluates to the
-      # serialized (request string) value of the form.
+     
+      # Observes the form with the DOM ID specified by +form_id+ and calls a
+      # callback when its contents have changed. The default callback is an
+      # Ajax call. By default all fields of the observed field are sent as
+      # parameters with the Ajax call.
+      #
+      # The +options+ for +observe_form+ are the same as the options for
+      # +observe_field+. The JavaScript variable +value+ available to the
+      # &lt;tt&gt;:with&lt;/tt&gt; option is set to the serialized form by default.
       def observe_form(form_id, options = {})
         if options[:frequency]
           build_observer('Form.Observer', form_id, options)
@@ -660,10 +676,10 @@ module ActionView
       end
     
       def build_observer(klass, name, options = {})
-        if options[:with] &amp;&amp; !options[:with].include?(&quot;=&quot;)
+        if options[:with] &amp;&amp; (options[:with] !~ /[=(.]/)
           options[:with] = &quot;'#{options[:with]}=' + value&quot;
         else
-          options[:with] ||= 'value' if options[:update]
+          options[:with] ||= 'value' unless options[:function]
         end
 
         callback = options[:function] || remote_function(options)</diff>
      <filename>vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,8 @@ class PaginationTest &lt; ActiveRecordTestCase
   
   class PaginationController &lt; ActionController::Base
     self.template_root = &quot;#{File.dirname(__FILE__)}/../fixtures/&quot;
+
+    around_filter :silence_deprecation_warnings
     
     def simple_paginate
       @topic_pages, @topics = paginate(:topics)
@@ -67,6 +69,13 @@ class PaginationTest &lt; ActiveRecordTestCase
                                              :count =&gt; &quot;d.id&quot;)        
       render :nothing =&gt; true
     end
+
+
+    def silence_deprecation_warnings
+      ActiveSupport::Deprecation.silence do
+        yield
+      end
+    end
     
     def rescue_errors(e) raise e end
 </diff>
      <filename>vendor/rails/actionpack/test/activerecord/pagination_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,8 @@ class ActionPackAssertionsController &lt; ActionController::Base
 
   def redirect_to_controller() redirect_to :controller =&gt; &quot;elsewhere&quot;, :action =&gt; &quot;flash_me&quot;; end
 
+  def redirect_to_controller_with_symbol() redirect_to :controller =&gt; :elsewhere, :action =&gt; :flash_me; end
+
   def redirect_to_path() redirect_to '/some/path' end
 
   def redirect_to_named_route() redirect_to route_one_url end
@@ -555,6 +557,17 @@ class ActionPackAssertionsControllerTest &lt; Test::Unit::TestCase
     assert_redirected_to 'http://test.host/some/path'
   end
 
+  def test_assert_redirection_with_symbol
+    process :redirect_to_controller_with_symbol
+    assert_nothing_raised {
+      assert_redirected_to :controller =&gt; &quot;elsewhere&quot;, :action =&gt; &quot;flash_me&quot;
+    }
+    process :redirect_to_controller_with_symbol
+    assert_nothing_raised {
+      assert_redirected_to :controller =&gt; :elsewhere, :action =&gt; :flash_me
+    }
+  end
+
   def test_redirected_to_with_nested_controller
     @controller = Admin::InnerModuleController.new
     get :redirect_to_absolute_controller</diff>
      <filename>vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -39,7 +39,10 @@ class AddressesTest &lt; Test::Unit::TestCase
   end
 
   def test_list
-    get :list
+    # because pagination is deprecated
+    ActiveSupport::Deprecation.silence do
+      get :list
+    end
     assert_equal &quot;We only need to get this far!&quot;, @response.body.chomp
   end
 end</diff>
      <filename>vendor/rails/actionpack/test/controller/addresses_render_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -88,7 +88,7 @@ class ControllerInstanceTests &lt; Test::Unit::TestCase
   # Mocha adds methods to Object which are then included in the public_instance_methods
   # This method hides those from the controller so the above tests won't know the difference
   def hide_mocha_methods_from_controller(controller)
-    mocha_methods = [:expects, :metaclass, :mocha, :mocha_inspect, :reset_mocha, :stubba_object, :stubba_method, :stubs, :verify]
+    mocha_methods = [:expects, :metaclass, :mocha, :mocha_inspect, :reset_mocha, :stubba_object, :stubba_method, :stubs, :verify, :__is_a__, :__metaclass__]
     controller.class.send(:hide_action, *mocha_methods)
   end
   </diff>
      <filename>vendor/rails/actionpack/test/controller/base_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -97,6 +97,7 @@ class ActionCachingTestController &lt; ActionController::Base
   caches_action :index
 
   def index
+    sleep 0.01
     @cache_this = Time.now.to_f.to_s
     render :text =&gt; @cache_this
   end
@@ -195,7 +196,7 @@ class ActionCacheTest &lt; Test::Unit::TestCase
   def test_xml_version_of_resource_is_treated_as_different_cache
     @mock_controller.mock_url_for = 'http://example.org/posts/'
     @mock_controller.mock_path    = '/posts/index.xml'
-    path_object = @path_class.new(@mock_controller)
+    path_object = @path_class.new(@mock_controller, {})
     assert_equal 'xml', path_object.extension
     assert_equal 'example.org/posts/index.xml', path_object.path
   end
@@ -204,7 +205,7 @@ class ActionCacheTest &lt; Test::Unit::TestCase
     @mock_controller.mock_url_for = 'http://example.org/'
     @mock_controller.mock_path    = '/'
 
-    assert_equal 'example.org/index', @path_class.path_for(@mock_controller)
+    assert_equal 'example.org/index', @path_class.path_for(@mock_controller, {})
   end
 
   def test_file_extensions</diff>
      <filename>vendor/rails/actionpack/test/controller/caching_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,11 @@ class CookieTest &lt; Test::Unit::TestCase
       cookies.delete(&quot;user_name&quot;)
     end
 
+    def delete_cookie_with_path
+      cookies.delete(&quot;user_name&quot;, :path =&gt; '/beaten')
+      render_text &quot;hello world&quot;
+    end
+
     def rescue_action(e) 
       raise unless ActionController::MissingTemplate # No templates here, and we don't care about the output 
     end
@@ -85,4 +90,10 @@ class CookieTest &lt; Test::Unit::TestCase
     assert_equal &quot;david&quot;, jar[&quot;user_name&quot;]
     assert_equal nil, jar[&quot;something_else&quot;]
   end
+
+  def test_delete_cookie_with_path
+    get :delete_cookie_with_path
+    assert_equal &quot;/beaten&quot;, @response.headers[&quot;cookie&quot;].first.path
+    assert_not_equal &quot;/&quot;, @response.headers[&quot;cookie&quot;].first.path
+  end
 end</diff>
      <filename>vendor/rails/actionpack/test/controller/cookie_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,12 @@
 require File.dirname(__FILE__) + '/../../abstract_unit'
 
 class DeprecatedBaseMethodsTest &lt; Test::Unit::TestCase
+  # ActiveRecord model mock to test pagination deprecation
+  class DummyModel
+    def self.find(*args) [] end
+    def self.count(*args) 0 end
+  end
+
   class Target &lt; ActionController::Base
     def deprecated_symbol_parameter_to_url_for
       redirect_to(url_for(:home_url, &quot;superstars&quot;))
@@ -18,6 +24,11 @@ class DeprecatedBaseMethodsTest &lt; Test::Unit::TestCase
       this_method_doesnt_exist
     end
 
+    def pagination
+      paginate :dummy_models, :class_name =&gt; 'DeprecatedBaseMethodsTest::DummyModel'
+      render :nothing =&gt; true
+    end
+
     def rescue_action(e) raise e end
   end
 
@@ -27,6 +38,7 @@ class DeprecatedBaseMethodsTest &lt; Test::Unit::TestCase
     @request    = ActionController::TestRequest.new
     @response   = ActionController::TestResponse.new
     @controller = Target.new
+    @controller.logger = Logger.new(nil) unless @controller.logger
   end
 
   def test_deprecated_symbol_parameter_to_url_for
@@ -57,4 +69,10 @@ class DeprecatedBaseMethodsTest &lt; Test::Unit::TestCase
     error = Test::Unit::Error.new('testing ur doodz', e)
     assert_not_deprecated { error.message }
   end
+
+  def test_pagination_deprecation
+    assert_deprecated('svn://errtheblog.com/svn/plugins/classic_pagination') do
+      get :pagination
+    end
+  end
 end</diff>
      <filename>vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@ class FilterParamTest &lt; Test::Unit::TestCase
     assert @controller.respond_to?(:filter_parameters)
     
     test_hashes = [[{},{},[]],
+    [{'foo'=&gt;nil},{'foo'=&gt;nil},[]],
     [{'foo'=&gt;'bar'},{'foo'=&gt;'bar'},[]],
     [{'foo'=&gt;'bar'},{'foo'=&gt;'bar'},%w'food'],
     [{'foo'=&gt;'bar'},{'foo'=&gt;'[FILTERED]'},%w'foo'],</diff>
      <filename>vendor/rails/actionpack/test/controller/filter_params_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ class FilterTest &lt; Test::Unit::TestCase
         @ran_filter ||= []
         @ran_filter &lt;&lt; &quot;ensure_login&quot;
       end
-      
+
       def clean_up
         @ran_after_filter ||= []
         @ran_after_filter &lt;&lt; &quot;clean_up&quot;
@@ -62,7 +62,7 @@ class FilterTest &lt; Test::Unit::TestCase
         render :inline =&gt; &quot;something else&quot;
       end
   end
-  
+
   class ConditionalFilterController &lt; ActionController::Base
     def show
       render :inline =&gt; &quot;ran action&quot;
@@ -86,7 +86,7 @@ class FilterTest &lt; Test::Unit::TestCase
         @ran_filter ||= []
         @ran_filter &lt;&lt; &quot;clean_up_tmp&quot;
       end
-      
+
       def rescue_action(e) raise(e) end
   end
 
@@ -94,7 +94,7 @@ class FilterTest &lt; Test::Unit::TestCase
     before_filter :ensure_login, :except =&gt; [ :show_without_filter, :another_action ]
   end
 
-  class OnlyConditionSymController &lt; ConditionalFilterController 
+  class OnlyConditionSymController &lt; ConditionalFilterController
     before_filter :ensure_login, :only =&gt; :show
   end
 
@@ -104,10 +104,10 @@ class FilterTest &lt; Test::Unit::TestCase
 
   class BeforeAndAfterConditionController &lt; ConditionalFilterController
     before_filter :ensure_login, :only =&gt; :show
-    after_filter  :clean_up_tmp, :only =&gt; :show 
+    after_filter  :clean_up_tmp, :only =&gt; :show
   end
-  
-  class OnlyConditionProcController &lt; ConditionalFilterController 
+
+  class OnlyConditionProcController &lt; ConditionalFilterController
     before_filter(:only =&gt; :show) {|c| c.assigns[&quot;ran_proc_filter&quot;] = true }
   end
 
@@ -131,6 +131,14 @@ class FilterTest &lt; Test::Unit::TestCase
     before_filter(ConditionalClassFilter, :ensure_login, Proc.new {|c| c.assigns[&quot;ran_proc_filter1&quot;] = true }, :except =&gt; :show_without_filter) { |c| c.assigns[&quot;ran_proc_filter2&quot;] = true}
   end
 
+  class EmptyFilterChainController &lt; TestController
+    self.filter_chain.clear
+    def show
+      @action_executed = true
+      render :text =&gt; &quot;yawp!&quot;
+    end
+  end
+
   class PrependingController &lt; TestController
     prepend_before_filter :wonderful_life
     # skip_before_filter :fire_flash
@@ -145,7 +153,7 @@ class FilterTest &lt; Test::Unit::TestCase
   class ConditionalSkippingController &lt; TestController
     skip_before_filter :ensure_login, :only =&gt; [ :login ]
     skip_after_filter  :clean_up,     :only =&gt; [ :login ]
-    
+
     before_filter :find_user, :only =&gt; [ :change_password ]
 
     def login
@@ -155,7 +163,7 @@ class FilterTest &lt; Test::Unit::TestCase
     def change_password
       render :inline =&gt; &quot;ran action&quot;
     end
-    
+
     protected
       def find_user
         @ran_filter ||= []
@@ -166,15 +174,15 @@ class FilterTest &lt; Test::Unit::TestCase
   class ConditionalParentOfConditionalSkippingController &lt; ConditionalFilterController
     before_filter :conditional_in_parent, :only =&gt; [:show, :another_action]
     after_filter  :conditional_in_parent, :only =&gt; [:show, :another_action]
-    
+
     private
-      
+
       def conditional_in_parent
         @ran_filter ||= []
         @ran_filter &lt;&lt; 'conditional_in_parent'
       end
   end
-  
+
   class ChildOfConditionalParentController &lt; ConditionalParentOfConditionalSkippingController
     skip_before_filter :conditional_in_parent, :only =&gt; :another_action
     skip_after_filter  :conditional_in_parent, :only =&gt; :another_action
@@ -197,7 +205,7 @@ class FilterTest &lt; Test::Unit::TestCase
       controller.assigns[&quot;was_audited&quot;] = true
     end
   end
-  
+
   class AroundFilter
     def before(controller)
       @execution_log = &quot;before&quot;
@@ -209,7 +217,7 @@ class FilterTest &lt; Test::Unit::TestCase
       controller.assigns[&quot;execution_log&quot;] = @execution_log + &quot; and after&quot;
       controller.assigns[&quot;after_ran&quot;] = true
       controller.class.execution_log &lt;&lt; &quot; after aroundfilter &quot; if controller.respond_to? :execution_log
-    end    
+    end
   end
 
   class AppendedAroundFilter
@@ -219,12 +227,12 @@ class FilterTest &lt; Test::Unit::TestCase
 
     def after(controller)
       controller.class.execution_log &lt;&lt; &quot; after appended aroundfilter &quot;
-    end    
-  end  
-  
+    end
+  end
+
   class AuditController &lt; ActionController::Base
     before_filter(AuditFilter)
-    
+
     def show
       render_text &quot;hello&quot;
     end
@@ -234,6 +242,14 @@ class FilterTest &lt; Test::Unit::TestCase
     around_filter AroundFilter.new
   end
 
+  class BeforeAfterClassFilterController &lt; PrependingController
+    begin
+      filter = AroundFilter.new
+      before_filter filter
+      after_filter filter
+    end
+  end
+
   class MixedFilterController &lt; PrependingController
     cattr_accessor :execution_log
 
@@ -247,7 +263,7 @@ class FilterTest &lt; Test::Unit::TestCase
     after_filter  { |c| c.class.execution_log &lt;&lt; &quot; after procfilter &quot; }
     append_around_filter AppendedAroundFilter.new
   end
-  
+
   class MixedSpecializationController &lt; ActionController::Base
     class OutOfOrder &lt; StandardError; end
 
@@ -285,6 +301,101 @@ class FilterTest &lt; Test::Unit::TestCase
       end
   end
 
+  class PrependingBeforeAndAfterController &lt; ActionController::Base
+    prepend_before_filter :before_all
+    prepend_after_filter :after_all
+    before_filter :between_before_all_and_after_all
+
+    def before_all
+      @ran_filter ||= []
+      @ran_filter &lt;&lt; 'before_all'
+    end
+
+    def after_all
+      @ran_filter ||= []
+      @ran_filter &lt;&lt; 'after_all'
+    end
+
+    def between_before_all_and_after_all
+      @ran_filter ||= []
+      @ran_filter &lt;&lt; 'between_before_all_and_after_all'
+    end
+    def show
+      render :text =&gt; 'hello'
+    end
+  end
+
+  class NonYieldingAroundFilterController &lt; ActionController::Base
+
+    before_filter :filter_one
+    around_filter :non_yielding_filter
+    before_filter :filter_two
+    after_filter :filter_three
+
+    def index
+      render :inline =&gt; &quot;index&quot;
+    end
+
+    #make sure the controller complains
+    def rescue_action(e); raise e; end
+
+    private
+
+      def filter_one
+        @filters  ||= []
+        @filters  &lt;&lt; &quot;filter_one&quot;
+      end
+
+      def filter_two
+        @filters  &lt;&lt; &quot;filter_two&quot;
+      end
+
+      def non_yielding_filter
+        @filters  &lt;&lt; &quot;zomg it didn't yield&quot;
+        @filter_return_value
+      end
+
+      def filter_three
+        @filters  &lt;&lt; &quot;filter_three&quot;
+      end
+
+  end
+
+  def test_non_yielding_around_filters_not_returning_false_do_not_raise
+    controller = NonYieldingAroundFilterController.new
+    controller.instance_variable_set &quot;@filter_return_value&quot;, true
+    assert_nothing_raised do
+      test_process(controller, &quot;index&quot;)
+    end
+  end
+
+  def test_non_yielding_around_filters_returning_false_do_not_raise
+    controller = NonYieldingAroundFilterController.new
+    controller.instance_variable_set &quot;@filter_return_value&quot;, false
+    assert_nothing_raised do
+      test_process(controller, &quot;index&quot;)
+    end
+  end
+
+  def test_after_filters_are_not_run_if_around_filter_returns_false
+    controller = NonYieldingAroundFilterController.new
+    controller.instance_variable_set &quot;@filter_return_value&quot;, false
+    test_process(controller, &quot;index&quot;)
+    assert_equal [&quot;filter_one&quot;, &quot;zomg it didn't yield&quot;], controller.assigns['filters']
+  end
+
+  def test_after_filters_are_not_run_if_around_filter_does_not_yield
+    controller = NonYieldingAroundFilterController.new
+    controller.instance_variable_set &quot;@filter_return_value&quot;, true
+    test_process(controller, &quot;index&quot;)
+    assert_equal [&quot;filter_one&quot;, &quot;zomg it didn't yield&quot;], controller.assigns['filters']
+  end
+
+  def test_empty_filter_chain
+    assert_equal 0, EmptyFilterChainController.filter_chain.size
+    assert test_process(EmptyFilterChainController).template.assigns['action_executed']
+  end
+
   def test_added_filter_to_inheritance_graph
     assert_equal [ :ensure_login ], TestController.before_filters
   end
@@ -292,11 +403,11 @@ class FilterTest &lt; Test::Unit::TestCase
   def test_base_class_in_isolation
     assert_equal [ ], ActionController::Base.before_filters
   end
-  
+
   def test_prepending_filter
     assert_equal [ :wonderful_life, :ensure_login ], PrependingController.before_filters
   end
-  
+
   def test_running_filters
     assert_equal %w( wonderful_life ensure_login ), test_process(PrependingController).template.assigns[&quot;ran_filter&quot;]
   end
@@ -304,11 +415,11 @@ class FilterTest &lt; Test::Unit::TestCase
   def test_running_filters_with_proc
     assert test_process(ProcController).template.assigns[&quot;ran_proc_filter&quot;]
   end
-  
+
   def test_running_filters_with_implicit_proc
     assert test_process(ImplicitProcController).template.assigns[&quot;ran_proc_filter&quot;]
   end
-  
+
   def test_running_filters_with_class
     assert test_process(AuditController).template.assigns[&quot;was_audited&quot;]
   end
@@ -319,7 +430,7 @@ class FilterTest &lt; Test::Unit::TestCase
     assert response.template.assigns[&quot;ran_class_filter&quot;]
     assert response.template.assigns[&quot;ran_proc_filter1&quot;]
     assert response.template.assigns[&quot;ran_proc_filter2&quot;]
-    
+
     response = test_process(AnomolousYetValidConditionController, &quot;show_without_filter&quot;)
     assert_equal nil, response.template.assigns[&quot;ran_filter&quot;]
     assert !response.template.assigns[&quot;ran_class_filter&quot;]
@@ -373,6 +484,12 @@ class FilterTest &lt; Test::Unit::TestCase
     assert controller.template.assigns[&quot;after_ran&quot;]
   end
 
+  def test_before_after_class_filter
+    controller = test_process(BeforeAfterClassFilterController)
+    assert controller.template.assigns[&quot;before_ran&quot;]
+    assert controller.template.assigns[&quot;after_ran&quot;]
+  end
+
   def test_having_properties_in_around_filter
     controller = test_process(AroundFilterController)
     assert_equal &quot;before and after&quot;, controller.template.assigns[&quot;execution_log&quot;]
@@ -381,10 +498,10 @@ class FilterTest &lt; Test::Unit::TestCase
   def test_prepending_and_appending_around_filter
     controller = test_process(MixedFilterController)
     assert_equal &quot; before aroundfilter  before procfilter  before appended aroundfilter &quot; +
-                 &quot; after appended aroundfilter  after aroundfilter  after procfilter &quot;, 
+                 &quot; after appended aroundfilter  after aroundfilter  after procfilter &quot;,
                  MixedFilterController.execution_log
   end
-  
+
   def test_rendering_breaks_filtering_chain
     response = test_process(RenderingController)
     assert_equal &quot;something else&quot;, response.body
@@ -412,6 +529,12 @@ class FilterTest &lt; Test::Unit::TestCase
     end
   end
 
+  def test_running_prepended_before_and_after_filter
+    assert_equal 3, PrependingBeforeAndAfterController.filter_chain.length
+    response = test_process(PrependingBeforeAndAfterController)
+    assert_equal %w( before_all between_before_all_and_after_all after_all ), response.template.assigns[&quot;ran_filter&quot;]
+  end
+
   def test_conditional_skipping_of_filters
     assert_nil test_process(ConditionalSkippingController, &quot;login&quot;).template.assigns[&quot;ran_filter&quot;]
     assert_equal %w( ensure_login find_user ), test_process(ConditionalSkippingController, &quot;change_password&quot;).template.assigns[&quot;ran_filter&quot;]</diff>
      <filename>vendor/rails/actionpack/test/controller/filters_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@ require 'stubba'
 module ActionController
   module Integration
     class Session
-      def process
+      def process(*args)
       end
 
       def generic_url_rewriter
@@ -56,8 +56,7 @@ class SessionTest &lt; Test::Unit::TestCase
 
     @session.expects(:get).with(path,args)
 
-    redirects = [true, true, false]
-    @session.stubs(:redirect?).returns(lambda { redirects.shift })
+    @session.stubs(:redirect?).returns(true).then.returns(true).then.returns(false)
     @session.expects(:follow_redirect!).times(2)
 
     @session.stubs(:status).returns(200)
@@ -69,8 +68,7 @@ class SessionTest &lt; Test::Unit::TestCase
 
     @session.expects(:post).with(path,args)
 
-    redirects = [true, true, false]
-    @session.stubs(:redirect?).returns(lambda { redirects.shift })
+    @session.stubs(:redirect?).returns(true).then.returns(true).then.returns(false)
     @session.expects(:follow_redirect!).times(2)
 
     @session.stubs(:status).returns(200)
@@ -134,15 +132,102 @@ class SessionTest &lt; Test::Unit::TestCase
     @session.head(path,params,headers)
   end
 
-  def test_xml_http_request
+  def test_xml_http_request_deprecated_call
     path = &quot;/index&quot;; params = &quot;blah&quot;; headers = {:location =&gt; 'blah'}
     headers_after_xhr = headers.merge(
       &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
       &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
     )
-    @session.expects(:post).with(path,params,headers_after_xhr)
-    @session.xml_http_request(path,params,headers)
+    @session.expects(:process).with(:post,path,params,headers_after_xhr)
+    assert_deprecated { @session.xml_http_request(path,params,headers) }
   end
+
+  def test_xml_http_request_get
+    path = &quot;/index&quot;; params = &quot;blah&quot;; headers = {:location =&gt; 'blah'}
+    headers_after_xhr = headers.merge(
+      &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
+      &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
+    )
+    @session.expects(:process).with(:get,path,params,headers_after_xhr)
+    @session.xml_http_request(:get,path,params,headers)
+  end
+
+  def test_xml_http_request_post
+    path = &quot;/index&quot;; params = &quot;blah&quot;; headers = {:location =&gt; 'blah'}
+    headers_after_xhr = headers.merge(
+      &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
+      &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
+    )
+    @session.expects(:process).with(:post,path,params,headers_after_xhr)
+    @session.xml_http_request(:post,path,params,headers)
+  end
+
+  def test_xml_http_request_put
+    path = &quot;/index&quot;; params = &quot;blah&quot;; headers = {:location =&gt; 'blah'}
+    headers_after_xhr = headers.merge(
+      &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
+      &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
+    )
+    @session.expects(:process).with(:put,path,params,headers_after_xhr)
+    @session.xml_http_request(:put,path,params,headers)
+  end
+
+  def test_xml_http_request_delete
+    path = &quot;/index&quot;; params = &quot;blah&quot;; headers = {:location =&gt; 'blah'}
+    headers_after_xhr = headers.merge(
+      &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
+      &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
+    )
+    @session.expects(:process).with(:delete,path,params,headers_after_xhr)
+    @session.xml_http_request(:delete,path,params,headers)
+  end
+
+  def test_xml_http_request_head
+    path = &quot;/index&quot;; params = &quot;blah&quot;; headers = {:location =&gt; 'blah'}
+    headers_after_xhr = headers.merge(
+      &quot;X-Requested-With&quot; =&gt; &quot;XMLHttpRequest&quot;,
+      &quot;Accept&quot;           =&gt; &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
+    )
+    @session.expects(:process).with(:head,path,params,headers_after_xhr)
+    @session.xml_http_request(:head,path,params,headers)
+  end
+end
+
+class IntegrationTestTest &lt; Test::Unit::TestCase
+
+  def setup
+    @test = ::ActionController::IntegrationTest.new(:default_test)
+    @test.class.stubs(:fixture_table_names).returns([])
+    @session = @test.open_session
+  end
+  
+  def test_opens_new_session
+    @test.class.expects(:fixture_table_names).times(2).returns(['foo'])
+
+    session1 = @test.open_session { |sess| }
+    session2 = @test.open_session # implicit session
+
+    assert_equal ::ActionController::Integration::Session, session1.class
+    assert_equal ::ActionController::Integration::Session, session2.class
+    assert_not_equal session1, session2
+  end
+
+end
+
+# Tests that integration tests don't call Controller test methods for processing.
+# Integration tests have their own setup and teardown.
+class IntegrationTestUsesCorrectClass &lt; ActionController::IntegrationTest
+
+  def self.fixture_table_names
+    []
+  end
+
+  def test_integration_methods_called
+    %w( get post head put delete ).each do |verb|
+      assert_nothing_raised(&quot;'#{verb}' should use integration test methods&quot;) { send(verb, '/') }
+    end
+  end
+
 end
 
 # TODO</diff>
      <filename>vendor/rails/actionpack/test/controller/integration_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -69,10 +69,6 @@ class TestController &lt; ActionController::Base
     render &quot;test/hello&quot;
   end
 
-  def heading
-    head :ok
-  end
-
   def greeting
     # let's just rely on the template
   end
@@ -290,50 +286,8 @@ class RenderTest &lt; Test::Unit::TestCase
     assert_equal &quot;Goodbye, Local David&quot;, @response.body
   end
 
-  def test_render_200_should_set_etag
-    get :render_hello_world_from_variable
-    assert_equal etag_for(&quot;hello david&quot;), @response.headers['Etag']
-  end
-
-  def test_render_against_etag_request_should_304_when_match
-    @request.headers[&quot;HTTP_IF_NONE_MATCH&quot;] = etag_for(&quot;hello david&quot;)
-    get :render_hello_world_from_variable
-    assert_equal &quot;304 Not Modified&quot;, @response.headers['Status']
-    assert @response.body.empty?
-  end
-
-  def test_render_against_etag_request_should_200_when_no_match
-    @request.headers[&quot;HTTP_IF_NONE_MATCH&quot;] = etag_for(&quot;hello somewhere else&quot;)
-    get :render_hello_world_from_variable
-    assert_equal &quot;200 OK&quot;, @response.headers['Status']
-    assert !@response.body.empty?
-  end
-
-  def test_render_with_etag
-    get :render_hello_world_from_variable
-    expected_etag = &quot;\&quot;#{MD5.new(&quot;hello david&quot;).to_s}\&quot;&quot;
-    assert_equal expected_etag, @response.headers['Etag']
-    
-    @request.headers[&quot;HTTP_IF_NONE_MATCH&quot;] = expected_etag
-    get :render_hello_world_from_variable
-    assert_equal &quot;304 Not Modified&quot;, @response.headers['Status']
-    
-    @request.headers[&quot;HTTP_IF_NONE_MATCH&quot;] = &quot;\&quot;diftag\&quot;&quot;
-    get :render_hello_world_from_variable
-    assert_equal &quot;200 OK&quot;, @response.headers['Status']
-  end
-
-  def render_with_404_shouldnt_have_etag
-    get :render_custom_code
-    assert_nil @response.headers['Etag']
-  end
-
   protected
     def assert_deprecated_render(&amp;block)
       assert_deprecated(/render/, &amp;block)
     end
-    
-    def etag_for(text)
-      &quot;\&quot;#{MD5.new(text).to_s}\&quot;&quot;
-    end
 end</diff>
      <filename>vendor/rails/actionpack/test/controller/render_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,8 +10,9 @@ class ThreadsController  &lt; ResourcesController; end
 class MessagesController &lt; ResourcesController; end
 class CommentsController &lt; ResourcesController; end
 
-class AccountController &lt;  ResourcesController; end
-class AdminController   &lt;  ResourcesController; end
+class AccountController  &lt; ResourcesController; end
+class AdminController    &lt; ResourcesController; end
+class ProductsController &lt; ResourcesController; end
 
 class ResourcesTest &lt; Test::Unit::TestCase
   def test_should_arrange_actions
@@ -63,13 +64,13 @@ class ResourcesTest &lt; Test::Unit::TestCase
     end
   end
 
-  def test_multile_with_path_prefix
+  def test_multiple_with_path_prefix
     with_restful_routing :messages, :comments, :path_prefix =&gt; '/thread/:thread_id' do
       assert_simply_restful_for :messages, :path_prefix =&gt; 'thread/5/', :options =&gt; { :thread_id =&gt; '5' }
       assert_simply_restful_for :comments, :path_prefix =&gt; 'thread/5/', :options =&gt; { :thread_id =&gt; '5' }
     end
   end
-  
+
   def test_with_name_prefix
     with_restful_routing :messages, :name_prefix =&gt; 'post_' do
       assert_simply_restful_for :messages, :name_prefix =&gt; 'post_'
@@ -78,7 +79,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
 
   def test_with_collection_action
     rss_options = {:action =&gt; 'rss'}
-    rss_path    = &quot;/messages;rss&quot;
+    rss_path    = &quot;/messages/rss&quot;
     actions = { 'a' =&gt; :put, 'b' =&gt; :post, 'c' =&gt; :delete }
 
     with_restful_routing :messages, :collection =&gt; { :rss =&gt; :get }.merge(actions) do
@@ -86,14 +87,14 @@ class ResourcesTest &lt; Test::Unit::TestCase
         assert_routing rss_path, options.merge(rss_options)
 
         actions.each do |action, method|
-          assert_recognizes(options.merge(:action =&gt; action), :path =&gt; &quot;/messages;#{action}&quot;, :method =&gt; method)
+          assert_recognizes(options.merge(:action =&gt; action), :path =&gt; &quot;/messages/#{action}&quot;, :method =&gt; method)
         end
       end
 
       assert_restful_named_routes_for :messages do |options|
         assert_named_route rss_path, :rss_messages_path, rss_options
         actions.keys.each do |action|
-          assert_named_route &quot;/messages;#{action}&quot;, &quot;#{action}_messages_path&quot;, :action =&gt; action
+          assert_named_route &quot;/messages/#{action}&quot;, &quot;#{action}_messages_path&quot;, :action =&gt; action
         end
       end
     end
@@ -103,7 +104,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
     [:put, :post].each do |method|
       with_restful_routing :messages, :member =&gt; { :mark =&gt; method } do
         mark_options = {:action =&gt; 'mark', :id =&gt; '1'}
-        mark_path    = &quot;/messages/1;mark&quot;
+        mark_path    = &quot;/messages/1/mark&quot;
         assert_restful_routes_for :messages do |options|
           assert_recognizes(options.merge(mark_options), :path =&gt; mark_path, :method =&gt; method)
         end
@@ -120,7 +121,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
       with_restful_routing :messages, :member =&gt; { :mark =&gt; method, :unmark =&gt; method } do
         %w(mark unmark).each do |action|
           action_options = {:action =&gt; action, :id =&gt; '1'}
-          action_path    = &quot;/messages/1;#{action}&quot;
+          action_path    = &quot;/messages/1/#{action}&quot;
           assert_restful_routes_for :messages do |options|
             assert_recognizes(options.merge(action_options), :path =&gt; action_path, :method =&gt; method)
           end
@@ -136,7 +137,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
   def test_with_new_action
     with_restful_routing :messages, :new =&gt; { :preview =&gt; :post } do
       preview_options = {:action =&gt; 'preview'}
-      preview_path    = &quot;/messages/new;preview&quot;
+      preview_path    = &quot;/messages/new/preview&quot;
       assert_restful_routes_for :messages do |options|
         assert_recognizes(options.merge(preview_options), :path =&gt; preview_path, :method =&gt; :post)
       end
@@ -178,9 +179,11 @@ class ResourcesTest &lt; Test::Unit::TestCase
       assert_simply_restful_for :threads
       assert_simply_restful_for :messages,
         :path_prefix =&gt; 'threads/1/',
+        :name_prefix =&gt; 'thread_',
         :options =&gt; { :thread_id =&gt; '1' }
       assert_simply_restful_for :comments,
         :path_prefix =&gt; 'threads/1/messages/2/',
+        :name_prefix =&gt; 'thread_message_',
         :options =&gt; { :thread_id =&gt; '1', :message_id =&gt; '2' }
     end
   end
@@ -217,9 +220,9 @@ class ResourcesTest &lt; Test::Unit::TestCase
           admin.resource :account
         end
       end
-      
+
       assert_singleton_restful_for :admin
-      assert_singleton_restful_for :account, :path_prefix =&gt; 'admin/'
+      assert_singleton_restful_for :account, :path_prefix =&gt; 'admin/', :name_prefix =&gt; 'admin_'
     end
   end
 
@@ -227,7 +230,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
     [:put, :post].each do |method|
       with_singleton_resources :account, :member =&gt; { :reset =&gt; method } do
         reset_options = {:action =&gt; 'reset'}
-        reset_path    = &quot;/account;reset&quot;
+        reset_path    = &quot;/account/reset&quot;
         assert_singleton_routes_for :account do |options|
           assert_recognizes(options.merge(reset_options), :path =&gt; reset_path, :method =&gt; method)
         end
@@ -244,7 +247,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
       with_singleton_resources :account, :member =&gt; { :reset =&gt; method, :disable =&gt; method } do
         %w(reset disable).each do |action|
           action_options = {:action =&gt; action}
-          action_path    = &quot;/account;#{action}&quot;
+          action_path    = &quot;/account/#{action}&quot;
           assert_singleton_routes_for :account do |options|
             assert_recognizes(options.merge(action_options), :path =&gt; action_path, :method =&gt; method)
           end
@@ -264,9 +267,9 @@ class ResourcesTest &lt; Test::Unit::TestCase
           account.resources :messages
         end
       end
-      
+
       assert_singleton_restful_for :account
-      assert_simply_restful_for :messages, :path_prefix =&gt; 'account/'
+      assert_simply_restful_for :messages, :path_prefix =&gt; 'account/', :name_prefix =&gt; 'account_'
     end
   end
 
@@ -279,10 +282,10 @@ class ResourcesTest &lt; Test::Unit::TestCase
       end
 
       assert_singleton_restful_for :account, :path_prefix =&gt; '7/', :options =&gt; { :site_id =&gt; '7' }
-      assert_simply_restful_for :messages, :path_prefix =&gt; '7/account/', :options =&gt; { :site_id =&gt; '7' }
+      assert_simply_restful_for :messages, :path_prefix =&gt; '7/account/', :name_prefix =&gt; 'account_', :options =&gt; { :site_id =&gt; '7' }
     end
   end
-  
+
   def test_should_nest_singleton_resource_in_resources
     with_routing do |set|
       set.draw do |map|
@@ -290,9 +293,9 @@ class ResourcesTest &lt; Test::Unit::TestCase
           thread.resource :admin
         end
       end
-      
+
       assert_simply_restful_for :threads
-      assert_singleton_restful_for :admin, :path_prefix =&gt; 'threads/5/', :options =&gt; { :thread_id =&gt; '5' }
+      assert_singleton_restful_for :admin, :path_prefix =&gt; 'threads/5/', :name_prefix =&gt; 'thread_', :options =&gt; { :thread_id =&gt; '5' }
     end
   end
 
@@ -312,6 +315,181 @@ class ResourcesTest &lt; Test::Unit::TestCase
     end
   end
 
+  def test_resource_action_separator
+    with_routing do |set|
+      set.draw do |map|
+        map.resources :messages, :collection =&gt; {:search =&gt; :get}, :new =&gt; {:preview =&gt; :any}, :name_prefix =&gt; 'thread_', :path_prefix =&gt; '/threads/:thread_id'
+        map.resource :account, :member =&gt; {:login =&gt; :get}, :new =&gt; {:preview =&gt; :any}, :name_prefix =&gt; 'admin_', :path_prefix =&gt; '/admin'
+      end
+
+      action_separator = ActionController::Base.resource_action_separator
+
+      assert_simply_restful_for :messages, :name_prefix =&gt; 'thread_', :path_prefix =&gt; 'threads/1/', :options =&gt; { :thread_id =&gt; '1' }
+      assert_named_route &quot;/threads/1/messages#{action_separator}search&quot;, &quot;search_thread_messages_path&quot;, {}
+      assert_named_route &quot;/threads/1/messages/new&quot;, &quot;new_thread_message_path&quot;, {}
+      assert_named_route &quot;/threads/1/messages/new#{action_separator}preview&quot;, &quot;preview_new_thread_message_path&quot;, {}
+      assert_singleton_restful_for :account, :name_prefix =&gt; 'admin_', :path_prefix =&gt; 'admin/'
+      assert_named_route &quot;/admin/account#{action_separator}login&quot;, &quot;login_admin_account_path&quot;, {}
+      assert_named_route &quot;/admin/account/new&quot;, &quot;new_admin_account_path&quot;, {}
+      assert_named_route &quot;/admin/account/new#{action_separator}preview&quot;, &quot;preview_new_admin_account_path&quot;, {}
+    end
+  end
+
+  def test_new_style_named_routes_for_resource
+    with_routing do |set|
+      set.draw do |map|
+        map.resources :messages, :collection =&gt; {:search =&gt; :get}, :new =&gt; {:preview =&gt; :any}, :name_prefix =&gt; 'thread_', :path_prefix =&gt; '/threads/:thread_id'
+      end
+      assert_simply_restful_for :messages, :name_prefix =&gt; 'thread_', :path_prefix =&gt; 'threads/1/', :options =&gt; { :thread_id =&gt; '1' }
+      assert_named_route &quot;/threads/1/messages/search&quot;, &quot;search_thread_messages_path&quot;, {}
+      assert_named_route &quot;/threads/1/messages/new&quot;, &quot;new_thread_message_path&quot;, {}
+      assert_named_route &quot;/threads/1/messages/new/preview&quot;, &quot;preview_new_thread_message_path&quot;, {}
+    end
+  end
+
+  def test_new_style_named_routes_for_singleton_resource
+    with_routing do |set|
+      set.draw do |map|
+        map.resource :account, :member =&gt; {:login =&gt; :get}, :new =&gt; {:preview =&gt; :any}, :name_prefix =&gt; 'admin_', :path_prefix =&gt; '/admin'
+      end
+      assert_singleton_restful_for :account, :name_prefix =&gt; 'admin_', :path_prefix =&gt; 'admin/'
+      assert_named_route &quot;/admin/account/login&quot;, &quot;login_admin_account_path&quot;, {}
+      assert_named_route &quot;/admin/account/new&quot;, &quot;new_admin_account_path&quot;, {}
+      assert_named_route &quot;/admin/account/new/preview&quot;, &quot;preview_new_admin_account_path&quot;, {}
+    end
+  end
+
+  def test_should_add_deprecated_named_routes_for_resource
+    with_routing do |set|
+      set.draw do |map|
+        map.resources :messages, :collection =&gt; {:search =&gt; :get}, :new =&gt; {:preview =&gt; :any}, :name_prefix =&gt; 'thread_', :path_prefix =&gt; '/threads/:thread_id'
+      end
+      assert_simply_restful_for :messages, :name_prefix =&gt; 'thread_', :path_prefix =&gt; 'threads/1/', :options =&gt; { :thread_id =&gt; '1' }
+      assert_deprecated do
+        assert_named_route &quot;/threads/1/messages/search&quot;, &quot;thread_search_messages_path&quot;, {}
+        assert_named_route &quot;/threads/1/messages/new&quot;, &quot;thread_new_message_path&quot;, {}
+        assert_named_route &quot;/threads/1/messages/new/preview&quot;, &quot;thread_preview_new_message_path&quot;, {}
+      end
+    end
+  end
+
+  def test_should_add_deprecated_named_routes_for_singleton_resource
+    with_routing do |set|
+      set.draw do |map|
+        map.resource :account, :member =&gt; {:login =&gt; :get}, :new =&gt; {:preview =&gt; :any}, :name_prefix =&gt; 'admin_', :path_prefix =&gt; '/admin'
+      end
+      assert_singleton_restful_for :account, :name_prefix =&gt; 'admin_', :path_prefix =&gt; 'admin/'
+      assert_deprecated do
+        assert_named_route &quot;/admin/account/login&quot;, &quot;admin_login_account_path&quot;, {}
+        assert_named_route &quot;/admin/account/new&quot;, &quot;admin_new_account_path&quot;, {}
+        assert_named_route &quot;/admin/account/new/preview&quot;, &quot;admin_preview_new_account_path&quot;, {}
+      end
+    end
+  end
+
+  def test_should_add_deprecated_named_routes_for_nested_resources
+    with_routing do |set|
+      set.draw do |map|
+        map.resources :threads do |map|
+          map.resources :messages do |map|
+            map.resources :comments
+          end
+        end
+      end
+
+      assert_simply_restful_for :threads
+      assert_simply_restful_for :messages,
+        :path_prefix =&gt; 'threads/1/',
+        :name_prefix =&gt; 'thread_',
+        :options =&gt; { :thread_id =&gt; '1' }
+      assert_simply_restful_for :comments,
+        :path_prefix =&gt; 'threads/1/messages/2/',
+        :name_prefix =&gt; 'thread_message_',
+        :options =&gt; { :thread_id =&gt; '1', :message_id =&gt; '2' }
+
+      assert_deprecated do
+        assert_named_route &quot;/threads/1/messages&quot;, &quot;messages_path&quot;, {}
+        assert_named_route &quot;/threads/1/messages/1&quot;, &quot;message_path&quot;, {:thread_id =&gt; '1', :id =&gt; '1'}
+        assert_named_route &quot;/threads/1/messages/new&quot;, &quot;new_message_path&quot;, {:thread_id =&gt; '1'}
+        assert_named_route &quot;/threads/1/messages/1/edit&quot;, &quot;edit_message_path&quot;, {:thread_id =&gt; '1', :id =&gt; '1'}
+      end
+    end
+  end
+
+  def test_should_add_deprecated_named_routes_for_nested_singleton_resources
+    with_routing do |set|
+      set.draw do |map|
+        map.resource :admin do |admin|
+          admin.resource :account
+        end
+      end
+
+      assert_singleton_restful_for :admin
+      assert_singleton_restful_for :account, :path_prefix =&gt; 'admin/', :name_prefix =&gt; 'admin_'
+
+      assert_deprecated do
+        assert_named_route &quot;/admin/account&quot;, &quot;account_path&quot;, {}
+        assert_named_route &quot;/admin/account/new&quot;, &quot;new_account_path&quot;, {}
+        assert_named_route &quot;/admin/account/edit&quot;, &quot;edit_account_path&quot;, {}
+      end
+    end
+  end
+
+  def test_should_add_deprecated_named_routes_for_nested_resources_in_singleton_resource
+    with_routing do |set|
+      set.draw do |map|
+        map.resource :account do |account|
+          account.resources :messages
+        end
+      end
+
+      assert_singleton_restful_for :account
+      assert_simply_restful_for :messages, :path_prefix =&gt; 'account/', :name_prefix =&gt; 'account_'
+
+      assert_deprecated do
+        assert_named_route &quot;/account/messages&quot;, &quot;messages_path&quot;, {}
+        assert_named_route &quot;/account/messages/1&quot;, &quot;message_path&quot;, {:id =&gt; '1'}
+        assert_named_route &quot;/account/messages/new&quot;, &quot;new_message_path&quot;, {}
+        assert_named_route &quot;/account/messages/1/edit&quot;, &quot;edit_message_path&quot;, {:id =&gt; '1'}
+      end
+    end
+  end
+
+  def test_should_add_deprecated_named_routes_for_nested_singleton_resource_in_resources
+    with_routing do |set|
+      set.draw do |map|
+        map.resources :threads do |thread|
+          thread.resource :admin
+        end
+      end
+
+      assert_simply_restful_for :threads
+      assert_singleton_restful_for :admin, :path_prefix =&gt; 'threads/5/', :name_prefix =&gt; 'thread_', :options =&gt; { :thread_id =&gt; '5' }
+
+      assert_deprecated do
+        assert_named_route &quot;/threads/5/admin&quot;, &quot;admin_path&quot;, {}
+        assert_named_route &quot;/threads/5/admin/new&quot;, &quot;new_admin_path&quot;, {}
+        assert_named_route &quot;/threads/5/admin/edit&quot;, &quot;edit_admin_path&quot;, {}
+      end
+    end
+  end
+
+  def test_should_add_deprecated_formatted_routes
+    with_routing do |set|
+      set.draw do |map|
+        map.resources :products, :collection =&gt; { :specials =&gt; :get }, :member =&gt; { :thumbnail =&gt; :get }
+        map.resource :account, :member =&gt; { :icon =&gt; :get }
+      end
+      assert_restful_routes_for :products do |options|
+        assert_recognizes options.merge({ :action =&gt; 'specials', :format =&gt; 'xml' }), :path =&gt; '/products.xml;specials', :method =&gt; :get
+        assert_recognizes options.merge({ :action =&gt; 'thumbnail', :format =&gt; 'jpg', :id =&gt; '1' }), :path =&gt; '/products/1.jpg;thumbnail', :method =&gt; :get
+      end
+      assert_singleton_restful_for :account do |options|
+        assert_recognizes options.merge({ :action =&gt; 'icon', :format =&gt; 'jpg' }), :path =&gt; '/account.jpg;icon', :method =&gt; :get
+      end
+    end
+  end
+
   protected
     def with_restful_routing(*args)
       with_routing do |set|
@@ -319,7 +497,7 @@ class ResourcesTest &lt; Test::Unit::TestCase
         yield
       end
     end
-    
+
     def with_singleton_resources(*args)
       with_routing do |set|
         set.draw { |map| map.resource(*args) }
@@ -344,8 +522,8 @@ class ResourcesTest &lt; Test::Unit::TestCase
       collection_path            = &quot;/#{options[:path_prefix]}#{controller_name}&quot;
       member_path                = &quot;#{collection_path}/1&quot;
       new_path                   = &quot;#{collection_path}/new&quot;
-      edit_member_path           = &quot;#{member_path};edit&quot;
-      formatted_edit_member_path = &quot;#{member_path}.xml;edit&quot;
+      edit_member_path           = &quot;#{member_path}/edit&quot;
+      formatted_edit_member_path = &quot;#{member_path}/edit.xml&quot;
 
       with_options(options[:options]) do |controller|
         controller.assert_routing collection_path,            :action =&gt; 'index'
@@ -395,13 +573,13 @@ class ResourcesTest &lt; Test::Unit::TestCase
       name_prefix = options[:name_prefix]
 
       assert_named_route &quot;#{full_prefix}&quot;,            &quot;#{name_prefix}#{controller_name}_path&quot;,              options[:options]
-      assert_named_route &quot;#{full_prefix}/new&quot;,        &quot;#{name_prefix}new_#{singular_name}_path&quot;,            options[:options]
+      assert_named_route &quot;#{full_prefix}/new&quot;,        &quot;new_#{name_prefix}#{singular_name}_path&quot;,            options[:options]
       assert_named_route &quot;#{full_prefix}/1&quot;,          &quot;#{name_prefix}#{singular_name}_path&quot;,                options[:options].merge(:id =&gt; '1')
-      assert_named_route &quot;#{full_prefix}/1;edit&quot;,     &quot;#{name_prefix}edit_#{singular_name}_path&quot;,           options[:options].merge(:id =&gt; '1')
+      assert_named_route &quot;#{full_prefix}/1/edit&quot;,     &quot;edit_#{name_prefix}#{singular_name}_path&quot;,           options[:options].merge(:id =&gt; '1')
       assert_named_route &quot;#{full_prefix}.xml&quot;,        &quot;formatted_#{name_prefix}#{controller_name}_path&quot;,    options[:options].merge(            :format =&gt; 'xml')
-      assert_named_route &quot;#{full_prefix}/new.xml&quot;,    &quot;formatted_#{name_prefix}new_#{singular_name}_path&quot;,  options[:options].merge(            :format =&gt; 'xml')
+      assert_named_route &quot;#{full_prefix}/new.xml&quot;,    &quot;formatted_new_#{name_prefix}#{singular_name}_path&quot;,  options[:options].merge(            :format =&gt; 'xml')
       assert_named_route &quot;#{full_prefix}/1.xml&quot;,      &quot;formatted_#{name_prefix}#{singular_name}_path&quot;,      options[:options].merge(:id =&gt; '1', :format =&gt; 'xml')
-      assert_named_route &quot;#{full_prefix}/1.xml;edit&quot;, &quot;formatted_#{name_prefix}edit_#{singular_name}_path&quot;, options[:options].merge(:id =&gt; '1', :format =&gt; 'xml')
+      assert_named_route &quot;#{full_prefix}/1/edit.xml&quot;, &quot;formatted_edit_#{name_prefix}#{singular_name}_path&quot;, options[:options].merge(:id =&gt; '1', :format =&gt; 'xml')
       yield options[:options] if block_given?
     end
 
@@ -410,8 +588,8 @@ class ResourcesTest &lt; Test::Unit::TestCase
 
       full_path           = &quot;/#{options[:path_prefix]}#{singleton_name}&quot;
       new_path            = &quot;#{full_path}/new&quot;
-      edit_path           = &quot;#{full_path};edit&quot;
-      formatted_edit_path = &quot;#{full_path}.xml;edit&quot;
+      edit_path           = &quot;#{full_path}/edit&quot;
+      formatted_edit_path = &quot;#{full_path}/edit.xml&quot;
 
       with_options options[:options] do |controller|
         controller.assert_routing full_path,           :action =&gt; 'show'
@@ -448,13 +626,14 @@ class ResourcesTest &lt; Test::Unit::TestCase
       options[:options].delete :action
 
       full_path = &quot;/#{options[:path_prefix]}#{singleton_name}&quot;
-
-      assert_named_route &quot;#{full_path}&quot;,          &quot;#{singleton_name}_path&quot;,                options[:options]
-      assert_named_route &quot;#{full_path}/new&quot;,      &quot;new_#{singleton_name}_path&quot;,            options[:options]
-      assert_named_route &quot;#{full_path};edit&quot;,     &quot;edit_#{singleton_name}_path&quot;,           options[:options]
-      assert_named_route &quot;#{full_path}.xml&quot;,      &quot;formatted_#{singleton_name}_path&quot;,      options[:options].merge(:format =&gt; 'xml')
-      assert_named_route &quot;#{full_path}/new.xml&quot;,  &quot;formatted_new_#{singleton_name}_path&quot;,  options[:options].merge(:format =&gt; 'xml')
-      assert_named_route &quot;#{full_path}.xml;edit&quot;, &quot;formatted_edit_#{singleton_name}_path&quot;, options[:options].merge(:format =&gt; 'xml')
+      full_name = &quot;#{options[:name_prefix]}#{singleton_name}&quot;
+
+      assert_named_route &quot;#{full_path}&quot;,          &quot;#{full_name}_path&quot;,                options[:options]
+      assert_named_route &quot;#{full_path}/new&quot;,      &quot;new_#{full_name}_path&quot;,            options[:options]
+      assert_named_route &quot;#{full_path}/edit&quot;,     &quot;edit_#{full_name}_path&quot;,           options[:options]
+      assert_named_route &quot;#{full_path}.xml&quot;,      &quot;formatted_#{full_name}_path&quot;,      options[:options].merge(:format =&gt; 'xml')
+      assert_named_route &quot;#{full_path}/new.xml&quot;,  &quot;formatted_new_#{full_name}_path&quot;,  options[:options].merge(:format =&gt; 'xml')
+      assert_named_route &quot;#{full_path}/edit.xml&quot;, &quot;formatted_edit_#{full_name}_path&quot;, options[:options].merge(:format =&gt; 'xml')
     end
 
     def assert_named_route(expected, route, options)</diff>
      <filename>vendor/rails/actionpack/test/controller/resources_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -265,7 +265,7 @@ class LegacyRouteSetTests &lt; Test::Unit::TestCase
       map.content '/content/:query', :controller =&gt; 'content', :action =&gt; 'show'
     end
     exception = assert_raise(ActionController::RoutingError) { rs.generate(:controller =&gt; 'content', :action =&gt; 'show', :use_route =&gt; &quot;content&quot;) }
-    expected_message = %[content_url failed to generate from {:action=&gt;&quot;show&quot;, :controller=&gt;&quot;content&quot;} - you may have ambiguous routes, or you may need to supply additional parameters for this route.  content_url has the following required parameters: [&quot;content&quot;, :query] - are they all satisifed?]
+    expected_message = &quot;content_url failed to generate from #{{:action=&gt;&quot;show&quot;, :controller=&gt;&quot;content&quot;}.inspect} - you may have ambiguous routes, or you may need to supply additional parameters for this route.  content_url has the following required parameters: [\&quot;content\&quot;, :query] - are they all satisifed?&quot;
     assert_equal expected_message, exception.message
   end
   
@@ -946,7 +946,7 @@ class RouteTest &lt; Test::Unit::TestCase
   end
 
   def test_expand_array_build_query_string
-    assert_equal '?x[]=1&amp;x[]=2', order_query_string(@route.build_query_string(:x =&gt; [1, 2]))
+    assert_equal '?x%5B%5D=1&amp;x%5B%5D=2', order_query_string(@route.build_query_string(:x =&gt; [1, 2]))
   end
 
   def test_escape_spaces_build_query_string_selected_keys</diff>
      <filename>vendor/rails/actionpack/test/controller/routing_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -482,6 +482,22 @@ HTML
     end
   end
 
+  def test_request_uri_updates
+    get :test_params
+    uri = @request.request_uri
+    assert_equal @request.env['REQUEST_URI'], uri
+    
+    get :test_uri
+    assert_not_equal uri, @request.request_uri
+    uri = @request.request_uri
+    assert_equal @request.env['REQUEST_URI'], uri
+
+    get :test_uri, :testing =&gt; true
+    assert_not_equal uri, @request.request_uri
+    uri = @request.request_uri
+    assert_equal @request.env['REQUEST_URI'], uri
+  end
+
   protected
     def with_foo_routing
       with_routing do |set|</diff>
      <filename>vendor/rails/actionpack/test/controller/test_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,15 +17,12 @@ class UrlRewriterTests &lt; Test::Unit::TestCase
     assert_match %r(/hi/hi/2$), u
   end
   
-
-  private
-    def split_query_string(str)
-      [str[0].chr] + str[1..-1].split(/&amp;/).sort
-    end
-  
-    def assert_query_equal(q1, q2)
-      assert_equal(split_query_string(q1), split_query_string(q2))
-    end
+  def test_anchor
+    assert_equal(
+      'http://test.host/c/a/i#anchor',
+      @rewriter.rewrite(:controller =&gt; 'c', :action =&gt; 'a', :id =&gt; 'i', :anchor =&gt; 'anchor')
+    )
+  end
 end
 
 class UrlWriterTests &lt; Test::Unit::TestCase
@@ -75,6 +72,12 @@ class UrlWriterTests &lt; Test::Unit::TestCase
       W.new.url_for(:controller =&gt; 'c', :action =&gt; 'a', :id =&gt; 'i', :protocol =&gt; 'https')
     )
   end
+
+  def test_anchor
+    assert_equal('/c/a#anchor',
+      W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :anchor =&gt; 'anchor')
+    )
+  end
   
   def test_named_route
     ActionController::Routing::Routes.draw do |map|
@@ -111,5 +114,58 @@ class UrlWriterTests &lt; Test::Unit::TestCase
   ensure
     ActionController::Routing::Routes.load!
   end
-  
+
+  def test_one_parameter
+    assert_equal('/c/a?param=val',
+      W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :param =&gt; 'val')
+    )
+  end
+
+  def test_two_parameters
+    url = W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :p1 =&gt; 'X1', :p2 =&gt; 'Y2')
+    params = extract_params(url)
+    assert_equal params[0], { :p1 =&gt; 'X1' }.to_query
+    assert_equal params[1], { :p2 =&gt; 'Y2' }.to_query
+  end
+
+  def test_hash_parameter
+    url = W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :query =&gt; {:name =&gt; 'Bob', :category =&gt; 'prof'})
+    params = extract_params(url)
+    assert_equal params[0], { 'query[category]' =&gt; 'prof' }.to_query
+    assert_equal params[1], { 'query[name]'     =&gt; 'Bob'  }.to_query
+  end
+
+  def test_array_parameter
+    url = W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :query =&gt; ['Bob', 'prof'])
+    params = extract_params(url)
+    assert_equal params[0], { 'query[]' =&gt; 'Bob'  }.to_query
+    assert_equal params[1], { 'query[]' =&gt; 'prof' }.to_query
+  end
+
+  def test_hash_recursive_parameters
+    url = W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :query =&gt; {:person =&gt; {:name =&gt; 'Bob', :position =&gt; 'prof'}, :hobby =&gt; 'piercing'})
+    params = extract_params(url)
+    assert_equal params[0], { 'query[hobby]'            =&gt; 'piercing' }.to_query
+    assert_equal params[1], { 'query[person][name]'     =&gt; 'Bob'      }.to_query
+    assert_equal params[2], { 'query[person][position]' =&gt; 'prof'     }.to_query
+  end
+
+  def test_hash_recursive_and_array_parameters
+    url = W.new.url_for(:only_path =&gt; true, :controller =&gt; 'c', :action =&gt; 'a', :id =&gt; 101, :query =&gt; {:person =&gt; {:name =&gt; 'Bob', :position =&gt; ['prof', 'art director']}, :hobby =&gt; 'piercing'})
+    assert_match %r(^/c/a/101), url
+    params = extract_params(url)
+    assert_equal params[0], { 'query[hobby]'              =&gt; 'piercing'     }.to_query
+    assert_equal params[1], { 'query[person][name]'       =&gt; 'Bob'          }.to_query
+    assert_equal params[2], { 'query[person][position][]' =&gt; 'art director' }.to_query
+    assert_equal params[3], { 'query[person][position][]' =&gt; 'prof'         }.to_query
+  end
+
+  def test_path_generation_for_symbol_parameter_keys
+    assert_generates(&quot;/image&quot;, :controller=&gt; :image)
+  end
+
+  private
+    def extract_params(url)
+      url.split('?', 2).last.split('&amp;')
+    end
 end</diff>
      <filename>vendor/rails/actionpack/test/controller/url_rewriter_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,9 +34,16 @@ class VerificationTest &lt; Test::Unit::TestCase
 
     verify :only =&gt; :must_be_post, :method =&gt; :post, :render =&gt; { :status =&gt; 405, :text =&gt; &quot;Must be post&quot; }, :add_headers =&gt; { &quot;Allow&quot; =&gt; &quot;POST&quot; }
 
+    verify :only =&gt; :guarded_one_for_named_route_test, :params =&gt; &quot;one&quot;,
+           :redirect_to =&gt; :foo_url
+
     def guarded_one
       render :text =&gt; &quot;#{params[:one]}&quot;
     end
+    
+    def guarded_one_for_named_route_test
+      render :text =&gt; &quot;#{params[:one]}&quot;
+    end
 
     def guarded_with_flash
       render :text =&gt; &quot;#{params[:one]}&quot;
@@ -94,6 +101,14 @@ class VerificationTest &lt; Test::Unit::TestCase
     @controller = TestController.new
     @request    = ActionController::TestRequest.new
     @response   = ActionController::TestResponse.new
+    ActionController::Routing::Routes.add_named_route :foo, '/foo', :controller =&gt; 'test', :action =&gt; 'foo'
+  end
+  
+  def test_no_deprecation_warning_for_named_route
+    assert_not_deprecated do
+      get :guarded_one_for_named_route_test, :two =&gt; &quot;not one&quot;
+      assert_redirected_to '/foo'
+    end
   end
 
   def test_guarded_one_with_prereqs</diff>
      <filename>vendor/rails/actionpack/test/controller/verification_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,4 @@
 xml.html do
   xml.p &quot;Hello&quot;
-end
\ No newline at end of file
+end
+&quot;String return value&quot;</diff>
      <filename>vendor/rails/actionpack/test/fixtures/test/hello_world.rxml</filename>
    </modified>
    <modified>
      <diff>@@ -165,7 +165,12 @@ class AssetTagHelperTest &lt; Test::Unit::TestCase
 
   def test_preset_empty_asset_id
     Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + &quot;/../fixtures/&quot;)
+    # on windows, setting ENV[&quot;XXX&quot;] to &quot;&quot; makes ENV[&quot;XXX&quot;] return nil
+    if RUBY_PLATFORM =~ /win32/
+      ENV[&quot;RAILS_ASSET_ID&quot;] = &quot; &quot;
+    else
     ENV[&quot;RAILS_ASSET_ID&quot;] = &quot;&quot;
+    end
     assert_equal %(&lt;img alt=&quot;Rails&quot; src=&quot;/images/rails.png&quot; /&gt;), image_tag(&quot;rails.png&quot;)
   end
 </diff>
      <filename>vendor/rails/actionpack/test/template/asset_tag_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -71,7 +71,12 @@ class CompiledTemplateTests &lt; Test::Unit::TestCase
   end
 
   def test_compile_time
-    `echo '#{@a}' &gt; #{@a}; echo '#{@b}' &gt; #{@b}; ln -s #{@a} #{@s}`
+    File.open(@a, &quot;w&quot;){|f| f.puts @a}
+    File.open(@b, &quot;w&quot;){|f| f.puts @b}
+
+    # windows doesn't support symlinks (even under cygwin)
+    windows = (RUBY_PLATFORM =~ /win32/)
+    `ln -s #{@a} #{@s}` unless windows
 
     v = ActionView::Base.new
     v.base_path = '.'
@@ -79,47 +84,54 @@ class CompiledTemplateTests &lt; Test::Unit::TestCase
 
     sleep 1
     t = Time.now
+    sleep 1
+
     v.compile_and_render_template(:rhtml, '', @a)
     v.compile_and_render_template(:rhtml, '', @b)
-    v.compile_and_render_template(:rhtml, '', @s)
+    v.compile_and_render_template(:rhtml, '', @s) unless windows
+
     a_n = v.method_names[@a]
     b_n = v.method_names[@b]
-    s_n = v.method_names[@s]
+    s_n = v.method_names[@s]  unless windows
+    ct_a = v.compile_time[a_n]
+    ct_b = v.compile_time[b_n]
+    ct_s = v.compile_time[s_n] unless windows
     # all of the files have changed since last compile
     assert v.compile_time[a_n] &gt; t
     assert v.compile_time[b_n] &gt; t
-    assert v.compile_time[s_n] &gt; t
+    assert v.compile_time[s_n] &gt; t unless windows
 
     sleep 1
-    t = Time.now
     v.compile_and_render_template(:rhtml, '', @a)
     v.compile_and_render_template(:rhtml, '', @b)
-    v.compile_and_render_template(:rhtml, '', @s)
+    v.compile_and_render_template(:rhtml, '', @s) unless windows
     # none of the files have changed since last compile
-    assert v.compile_time[a_n] &lt; t
-    assert v.compile_time[b_n] &lt; t
-    assert v.compile_time[s_n] &lt; t
+    # so they should not have been recmpiled
+    assert_equal ct_a, v.compile_time[a_n]
+    assert_equal ct_b, v.compile_time[b_n]
+    assert_equal ct_s, v.compile_time[s_n] unless windows
 
-    `rm #{@s}; ln -s #{@b} #{@s}`
+    `rm #{@s}; ln -s #{@b} #{@s}` unless windows
     v.compile_and_render_template(:rhtml, '', @a)
     v.compile_and_render_template(:rhtml, '', @b)
-    v.compile_and_render_template(:rhtml, '', @s)
+    v.compile_and_render_template(:rhtml, '', @s) unless windows
     # the symlink has changed since last compile
-    assert v.compile_time[a_n] &lt; t
-    assert v.compile_time[b_n] &lt; t
-    assert v.compile_time[s_n] &gt; t
+    assert_equal ct_a, v.compile_time[a_n]
+    assert_equal ct_b, v.compile_time[b_n]
+    assert v.compile_time[s_n] &gt; t unless windows
 
     sleep 1
-    `touch #{@b}`
+    FileUtils.touch @b
     t = Time.now
+    sleep 1
     v.compile_and_render_template(:rhtml, '', @a)
     v.compile_and_render_template(:rhtml, '', @b)
-    v.compile_and_render_template(:rhtml, '', @s)
+    v.compile_and_render_template(:rhtml, '', @s) unless windows
     # the file at the end of the symlink has changed since last compile
     # both the symlink and the file at the end of it should be recompiled
     assert v.compile_time[a_n] &lt; t
     assert v.compile_time[b_n] &gt; t
-    assert v.compile_time[s_n] &gt; t
+    assert v.compile_time[s_n] &gt; t unless windows
   end
 end
 </diff>
      <filename>vendor/rails/actionpack/test/template/compiled_templates_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,14 +36,14 @@ class JavaScriptHelperTest &lt; Test::Unit::TestCase
     html = link_to_function( &quot;Greet me!&quot; ) do |page|
       page.replace_html 'header', &quot;&lt;h1&gt;Greetings&lt;/h1&gt;&quot;
     end
-    assert_dom_equal %(&lt;a href=&quot;#&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;&amp;lt;h1&amp;gt;Greetings&amp;lt;/h1&amp;gt;&amp;quot;);; return false;&quot;&gt;Greet me!&lt;/a&gt;), html
+    assert_dom_equal %q(&lt;a href=&quot;#&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;\074h1\076Greetings\074/h1\076&amp;quot;);; return false;&quot;&gt;Greet me!&lt;/a&gt;), html
   end
 
   def test_link_to_function_with_rjs_block_and_options
     html = link_to_function( &quot;Greet me!&quot;, :class =&gt; &quot;updater&quot; ) do |page|
       page.replace_html 'header', &quot;&lt;h1&gt;Greetings&lt;/h1&gt;&quot;
     end
-    assert_dom_equal %(&lt;a href=&quot;#&quot; class=&quot;updater&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;&amp;lt;h1&amp;gt;Greetings&amp;lt;/h1&amp;gt;&amp;quot;);; return false;&quot;&gt;Greet me!&lt;/a&gt;), html
+    assert_dom_equal %q(&lt;a href=&quot;#&quot; class=&quot;updater&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;\074h1\076Greetings\074/h1\076&amp;quot;);; return false;&quot;&gt;Greet me!&lt;/a&gt;), html
   end
 
   def test_button_to_function
@@ -55,13 +55,13 @@ class JavaScriptHelperTest &lt; Test::Unit::TestCase
     html = button_to_function( &quot;Greet me!&quot; ) do |page|
       page.replace_html 'header', &quot;&lt;h1&gt;Greetings&lt;/h1&gt;&quot;
     end
-    assert_dom_equal %(&lt;input type=&quot;button&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;&amp;lt;h1&amp;gt;Greetings&amp;lt;/h1&amp;gt;&amp;quot;);;&quot; value=&quot;Greet me!&quot; /&gt;), html
+    assert_dom_equal %q(&lt;input type=&quot;button&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;\074h1\076Greetings\074/h1\076&amp;quot;);;&quot; value=&quot;Greet me!&quot; /&gt;), html
   end
 
   def test_button_to_function_with_rjs_block_and_options
     html = button_to_function( &quot;Greet me!&quot;, :class =&gt; &quot;greeter&quot; ) do |page|
       page.replace_html 'header', &quot;&lt;h1&gt;Greetings&lt;/h1&gt;&quot;
     end
-    assert_dom_equal %(&lt;input type=&quot;button&quot; class=&quot;greeter&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;&amp;lt;h1&amp;gt;Greetings&amp;lt;/h1&amp;gt;&amp;quot;);;&quot; value=&quot;Greet me!&quot; /&gt;), html
+    assert_dom_equal %q(&lt;input type=&quot;button&quot; class=&quot;greeter&quot; onclick=&quot;Element.update(&amp;quot;header&amp;quot;, &amp;quot;\074h1\076Greetings\074/h1\076&amp;quot;);;&quot; value=&quot;Greet me!&quot; /&gt;), html
   end
 end</diff>
      <filename>vendor/rails/actionpack/test/template/javascript_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ class NumberHelperTest &lt; Test::Unit::TestCase
   def test_number_to_currency
     assert_equal(&quot;$1,234,567,890.50&quot;, number_to_currency(1234567890.50))
     assert_equal(&quot;$1,234,567,890.51&quot;, number_to_currency(1234567890.506))
-    assert_equal(&quot;$1,234,567,890&quot;, number_to_currency(1234567890.50, {:precision =&gt; 0}))
+    assert_equal(&quot;$1,234,567,891&quot;, number_to_currency(1234567890.51, {:precision =&gt; 0}))
     assert_equal(&quot;$1,234,567,890.5&quot;, number_to_currency(1234567890.50, {:precision =&gt; 1}))
     assert_equal(&quot;&amp;pound;1234567890,50&quot;, number_to_currency(1234567890.50, {:unit =&gt; &quot;&amp;pound;&quot;, :separator =&gt; &quot;,&quot;, :delimiter =&gt; &quot;&quot;}))
     assert_equal(&quot;$1,234,567,890.50&quot;, number_to_currency(&quot;1234567890.50&quot;))</diff>
      <filename>vendor/rails/actionpack/test/template/number_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -125,7 +125,7 @@ class PrototypeHelperTest &lt; Test::Unit::TestCase
   end
   
   def test_observe_field
-    assert_dom_equal %(&lt;script type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nnew Form.Element.Observer('glass', 300, function(element, value) {new Ajax.Request('http://www.example.com/reorder_if_empty', {asynchronous:true, evalScripts:true})})\n//]]&gt;\n&lt;/script&gt;),
+    assert_dom_equal %(&lt;script type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nnew Form.Element.Observer('glass', 300, function(element, value) {new Ajax.Request('http://www.example.com/reorder_if_empty', {asynchronous:true, evalScripts:true, parameters:value})})\n//]]&gt;\n&lt;/script&gt;),
       observe_field(&quot;glass&quot;, :frequency =&gt; 5.minutes, :url =&gt; { :action =&gt; &quot;reorder_if_empty&quot; })
   end
   
@@ -135,7 +135,7 @@ class PrototypeHelperTest &lt; Test::Unit::TestCase
   end
   
   def test_observe_form
-    assert_dom_equal %(&lt;script type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nnew Form.Observer('cart', 2, function(element, value) {new Ajax.Request('http://www.example.com/cart_changed', {asynchronous:true, evalScripts:true})})\n//]]&gt;\n&lt;/script&gt;),
+    assert_dom_equal %(&lt;script type=\&quot;text/javascript\&quot;&gt;\n//&lt;![CDATA[\nnew Form.Observer('cart', 2, function(element, value) {new Ajax.Request('http://www.example.com/cart_changed', {asynchronous:true, evalScripts:true, parameters:value})})\n//]]&gt;\n&lt;/script&gt;),
       observe_form(&quot;cart&quot;, :frequency =&gt; 2, :url =&gt; { :action =&gt; &quot;cart_changed&quot; })
   end
   
@@ -170,23 +170,23 @@ class JavaScriptGeneratorTest &lt; Test::Unit::TestCase
   end
   
   def test_insert_html_with_string
-    assert_equal 'new Insertion.Top(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);',
+    assert_equal 'new Insertion.Top(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);',
       @generator.insert_html(:top, 'element', '&lt;p&gt;This is a test&lt;/p&gt;')
-    assert_equal 'new Insertion.Bottom(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);',
+    assert_equal 'new Insertion.Bottom(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);',
       @generator.insert_html(:bottom, 'element', '&lt;p&gt;This is a test&lt;/p&gt;')
-    assert_equal 'new Insertion.Before(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);',
+    assert_equal 'new Insertion.Before(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);',
       @generator.insert_html(:before, 'element', '&lt;p&gt;This is a test&lt;/p&gt;')
-    assert_equal 'new Insertion.After(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);',
+    assert_equal 'new Insertion.After(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);',
       @generator.insert_html(:after, 'element', '&lt;p&gt;This is a test&lt;/p&gt;')
   end
   
   def test_replace_html_with_string
-    assert_equal 'Element.update(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);',
+    assert_equal 'Element.update(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);',
       @generator.replace_html('element', '&lt;p&gt;This is a test&lt;/p&gt;')
   end
   
   def test_replace_element_with_string
-    assert_equal 'Element.replace(&quot;element&quot;, &quot;&lt;div id=\&quot;element\&quot;&gt;&lt;p&gt;This is a test&lt;/p&gt;&lt;/div&gt;&quot;);',
+    assert_equal 'Element.replace(&quot;element&quot;, &quot;\074div id=\&quot;element\&quot;\076\074p\076This is a test\074/p\076\074/div\076&quot;);',
       @generator.replace('element', '&lt;div id=&quot;element&quot;&gt;&lt;p&gt;This is a test&lt;/p&gt;&lt;/div&gt;')
   end
   
@@ -241,12 +241,12 @@ class JavaScriptGeneratorTest &lt; Test::Unit::TestCase
     @generator.remove('foo', 'bar')
     @generator.replace_html('baz', '&lt;p&gt;This is a test&lt;/p&gt;')
     
-    assert_equal &lt;&lt;-EOS.chomp, @generator.to_s
-new Insertion.Top(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);
-new Insertion.Bottom(&quot;element&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);
+    expected = %q(new Insertion.Top(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);
+new Insertion.Bottom(&quot;element&quot;, &quot;\074p\076This is a test\074/p\076&quot;);
 [&quot;foo&quot;, &quot;bar&quot;].each(Element.remove);
-Element.update(&quot;baz&quot;, &quot;&lt;p&gt;This is a test&lt;/p&gt;&quot;);
-    EOS
+Element.update(&quot;baz&quot;, &quot;\074p\076This is a test\074/p\076&quot;);)
+
+    assert_equal expected, @generator.to_s
   end
 
   def test_element_access</diff>
      <filename>vendor/rails/actionpack/test/template/prototype_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,17 @@
+*1.2.5* (October 12th, 2007)
+
+* Depend on Action Pack 1.13.5
+
+* Depend on Active Record 1.15.5
+
+
+*1.2.4* (October 4th, 2007)
+
+* Depend on Action Pack 1.13.4
+
+* Depend on Active Record 1.15.4
+
+
 *1.2.3* (March 12th, 2007)
 
 * Depend on Action Pack 1.13.3</diff>
      <filename>vendor/rails/actionwebservice/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -71,8 +71,8 @@ spec = Gem::Specification.new do |s|
   s.rubyforge_project = &quot;aws&quot;
   s.homepage = &quot;http://www.rubyonrails.org&quot;
 
-  s.add_dependency('actionpack', '= 1.13.3' + PKG_BUILD)
-  s.add_dependency('activerecord', '= 1.15.3' + PKG_BUILD)
+  s.add_dependency('actionpack', '= 1.13.5' + PKG_BUILD)
+  s.add_dependency('activerecord', '= 1.15.5' + PKG_BUILD)
 
   s.has_rdoc = true
   s.requirements &lt;&lt; 'none'</diff>
      <filename>vendor/rails/actionwebservice/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module ActionWebService
   module VERSION #:nodoc:
     MAJOR = 1
     MINOR = 2
-    TINY  = 3
+    TINY  = 5
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>vendor/rails/actionwebservice/lib/action_web_service/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,37 @@
+*1.15.5* (October 12th, 2007)
+
+* Depend on Action Pack 1.4.4
+
+
+*1.15.4* (October 4th, 2007)
+
+* Fix #count on a has_many :through association so that it recognizes the :uniq option. Closes #8801 [lifofifo]
+
+* Don't clobber includes passed to has_many.count [danger]
+
+* Make sure has_many uses :include when counting [danger]
+
+* Save associated records only if the association is already loaded.  #8713 [blaine]
+
+* Changing the :default Date format doesn't break date quoting.  #6312 [bshand, Elias]
+
+* Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
+
+* belongs_to assignment creates a new proxy rather than modifying its target in-place.  #8412 [mmangino@elevatedrails.com]
+
+* Fix column type detection while loading fixtures.  Closes #7987 [roderickvd]
+
+* Document deep eager includes.  #6267 [Josh Susser, Dan Manges]
+
+* Oracle: extract column length for CHAR also.  #7866 [ymendel]
+
+* Small additions and fixes for ActiveRecord documentation.  Closes #7342 [jeremymcanally]
+
+* SQLite: binary escaping works with $KCODE='u'.  #7862 [tsuka]
+
+* Improved cloning performance by relying less on exception raising #8159 [Blaine]
+
+
 *1.15.3* (March 12th, 2007)
 
 * Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool] </diff>
      <filename>vendor/rails/activerecord/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -151,7 +151,7 @@ spec = Gem::Specification.new do |s|
     s.files = s.files + Dir.glob( &quot;#{dir}/**/*&quot; ).delete_if { |item| item.include?( &quot;\.svn&quot; ) }
   end
   
-  s.add_dependency('activesupport', '= 1.4.2' + PKG_BUILD)
+  s.add_dependency('activesupport', '= 1.4.4' + PKG_BUILD)
 
   s.files.delete &quot;test/fixtures/fixture_database.sqlite&quot;
   s.files.delete &quot;test/fixtures/fixture_database_2.sqlite&quot;</diff>
      <filename>vendor/rails/activerecord/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -63,7 +63,7 @@ module ActiveRecord
             
             #{scope_condition_method}
             
-            after_destroy  :remove_from_list
+            before_destroy :remove_from_list
             before_create  :add_to_list_bottom
           EOV
         end
@@ -74,6 +74,7 @@ module ActiveRecord
       # lower in the list of all chapters. Likewise, &lt;tt&gt;chapter.first?&lt;/tt&gt; would return true if that chapter is
       # the first in the list of all chapters.
       module InstanceMethods
+        # Insert the item at the given position (defaults to the top position of 1).
         def insert_at(position = 1)
           insert_at_position(position)
         end
@@ -118,8 +119,12 @@ module ActiveRecord
           end
         end
         
+        # Removes the item from the list.
         def remove_from_list
-          decrement_positions_on_lower_items if in_list?
+          if in_list?
+            decrement_positions_on_lower_items
+            update_attribute position_column, nil
+          end
         end
 
         # Increase the position of this item without adjusting the rest of the list.
@@ -162,6 +167,7 @@ module ActiveRecord
           )
         end
 
+        # Test if this record is in a list
         def in_list?
           !send(position_column).nil?
         end
@@ -178,21 +184,26 @@ module ActiveRecord
           # Overwrite this method to define the scope of the list changes
           def scope_condition() &quot;1&quot; end
 
+          # Returns the bottom position number in the list.
+          #   bottom_position_in_list    # =&gt; 2
           def bottom_position_in_list(except = nil)
             item = bottom_item(except)
             item ? item.send(position_column) : 0
           end
 
+          # Returns the bottom item
           def bottom_item(except = nil)
             conditions = scope_condition
             conditions = &quot;#{conditions} AND #{self.class.primary_key} != #{except.id}&quot; if except
             acts_as_list_class.find(:first, :conditions =&gt; conditions, :order =&gt; &quot;#{position_column} DESC&quot;)
           end
 
+          # Forces item to assume the bottom position in the list.
           def assume_bottom_position
             update_attribute(position_column, bottom_position_in_list(self).to_i + 1)
           end
   
+          # Forces item to assume the top position in the list.
           def assume_top_position
             update_attribute(position_column, 1)
           end
@@ -227,6 +238,7 @@ module ActiveRecord
            )
           end
 
+          # Increments position (&lt;tt&gt;position_column&lt;/tt&gt;) of all items in the list.
           def increment_positions_on_all_items
             acts_as_list_class.update_all(
               &quot;#{position_column} = (#{position_column} + 1)&quot;,  &quot;#{scope_condition}&quot;</diff>
      <filename>vendor/rails/activerecord/lib/active_record/acts/list.rb</filename>
    </modified>
    <modified>
      <diff>@@ -70,16 +70,23 @@ module ActiveRecord
           nodes
         end
 
+        # Returns the root node of the tree.
         def root
           node = self
           node = node.parent while node.parent
           node
         end
 
+        # Returns all siblings of the current node.
+        #
+        #   subchild1.siblings # =&gt; [subchild2]
         def siblings
           self_and_siblings - [self]
         end
 
+        # Returns all siblings and a reference to the current node.
+        #
+        #   subchild1.self_and_siblings # =&gt; [subchild1, subchild2]
         def self_and_siblings
           parent ? parent.children : self.class.roots
         end</diff>
      <filename>vendor/rails/activerecord/lib/active_record/acts/tree.rb</filename>
    </modified>
    <modified>
      <diff>@@ -352,7 +352,15 @@ module ActiveRecord
     #   for post in Post.find(:all, :include =&gt; [ :author, :comments ])
     #
     # That'll add another join along the lines of: LEFT OUTER JOIN comments ON comments.post_id = posts.id. And we'll be down to 1 query.
-    # But that shouldn't fool you to think that you can pull out huge amounts of data with no performance penalty just because you've reduced
+    #
+    # To include a deep hierarchy of associations, using a hash:
+    #
+    #   for post in Post.find(:all, :include =&gt; [ :author, { :comments =&gt; { :author =&gt; :gravatar } } ])
+    #
+    # That'll grab not only all the comments but all their authors and gravatar pictures.  You can mix and match
+    # symbols, arrays and hashes in any combination to describe the associations you want to load.
+    #
+    # All of this power shouldn't fool you into thinking that you can pull out huge amounts of data with no performance penalty just because you've reduced
     # the number of queries. The database still needs to send all the data to Active Record and it still needs to be processed. So it's no
     # catch-all for performance problems, but it's a great way to cut down on the number of queries in a situation as the one described above.
     # 
@@ -734,6 +742,7 @@ module ActiveRecord
           deprecated_association_comparison_method(reflection.name, reflection.class_name)
         end
 
+        # Create the callbacks to update counter cache
         if options[:counter_cache]
           cache_column = options[:counter_cache] == true ?
             &quot;#{self.to_s.underscore.pluralize}_count&quot; :
@@ -871,6 +880,12 @@ module ActiveRecord
       end
 
       private
+        # Generate a join table name from two provided tables names.
+        # The order of names in join name is determined by lexical precedence.
+        #   join_table_name(&quot;members&quot;, &quot;clubs&quot;)
+        #   =&gt; &quot;clubs_members&quot;
+        #   join_table_name(&quot;members&quot;, &quot;special_clubs&quot;)
+        #   =&gt; &quot;members_special_clubs&quot;
         def join_table_name(first_table_name, second_table_name)
           if first_table_name &lt; second_table_name
             join_table = &quot;#{first_table_name}_#{second_table_name}&quot;
@@ -880,7 +895,7 @@ module ActiveRecord
 
           table_name_prefix + join_table + table_name_suffix
         end
-        
+      
         def association_accessor_methods(reflection, association_proxy_class)
           define_method(reflection.name) do |*params|
             force_reload = params.first unless params.empty?
@@ -901,7 +916,7 @@ module ActiveRecord
 
           define_method(&quot;#{reflection.name}=&quot;) do |new_value|
             association = instance_variable_get(&quot;@#{reflection.name}&quot;)
-            if association.nil?
+            if association.nil? || association.target != new_value
               association = association_proxy_class.new(self, reflection)
             end
 
@@ -911,10 +926,7 @@ module ActiveRecord
               instance_variable_set(&quot;@#{reflection.name}&quot;, association)
             else
               instance_variable_set(&quot;@#{reflection.name}&quot;, nil)
-              return nil
             end
-
-            association
           end
 
           define_method(&quot;set_#{reflection.name}_target&quot;) do |target|
@@ -981,18 +993,21 @@ module ActiveRecord
 
           after_callback = &lt;&lt;-end_eval
             association = instance_variable_get(&quot;@#{association_name}&quot;)
-            
-            if association.respond_to?(:loaded?)
-              if @new_record_before_save
-                records_to_save = association
-              else
-                records_to_save = association.select { |record| record.new_record? }
-              end
+
+            records_to_save = if @new_record_before_save
+              association
+            elsif association.respond_to?(:loaded?) &amp;&amp; association.loaded?
+              association.select { |record| record.new_record? }
+            else
+              []
+            end
+
+            if !records_to_save.blank?
               records_to_save.each { |record| association.send(:insert_record, record) }
               association.send(:construct_sql)   # reconstruct the SQL queries now that we know the owner's id
             end
           end_eval
-                
+
           # Doesn't use after_save as that would save associations added in after_create/after_update twice
           after_create(after_callback)
           after_update(after_callback)</diff>
      <filename>vendor/rails/activerecord/lib/active_record/associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -91,7 +91,11 @@ module ActiveRecord
           attributes.collect { |attr| create(attr) }
         else
           record = build(attributes)
-          record.save unless @owner.new_record?
+          if @owner.new_record?
+            ActiveSupport::Deprecation.warn(&quot;Calling .create on a has_many association without saving its owner will not work in rails 2.0, you probably want .build instead&quot;)
+          else
+            record.save
+          end
           record
         end
       end</diff>
      <filename>vendor/rails/activerecord/lib/active_record/associations/association_collection.rb</filename>
    </modified>
    <modified>
      <diff>@@ -50,7 +50,7 @@ module ActiveRecord
           options[:conditions] = options[:conditions].nil? ?
             @finder_sql :
             @finder_sql + &quot; AND (#{sanitize_sql(options[:conditions])})&quot;
-          options[:include] = @reflection.options[:include]
+          options[:include] ||= @reflection.options[:include]
 
           @reflection.klass.count(column_name, options)
         end
@@ -138,7 +138,7 @@ module ActiveRecord
           elsif @reflection.options[:counter_sql]
             @reflection.klass.count_by_sql(@counter_sql)
           else
-            @reflection.klass.count(:conditions =&gt; @counter_sql)
+            @reflection.klass.count(:conditions =&gt; @counter_sql, :include =&gt; @reflection.options[:include])
           end
           
           @target = [] and loaded if count == 0</diff>
      <filename>vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb</filename>
    </modified>
    <modified>
      <diff>@@ -101,6 +101,16 @@ module ActiveRecord
       def sum(*args, &amp;block)
         calculate(:sum, *args, &amp;block)
       end
+      
+      def count(*args)
+        column_name, options = @reflection.klass.send(:construct_count_options_from_legacy_args, *args)
+        if @reflection.options[:uniq]
+          # This is needed becase 'SELECT count(DISTINCT *)..' is not valid sql statement.
+          column_name = &quot;#{@reflection.klass.table_name}.#{@reflection.klass.primary_key}&quot; if column_name == :all
+          options.merge!(:distinct =&gt; true) 
+        end
+        @reflection.klass.send(:with_scope, construct_scope) { @reflection.klass.count(column_name, options) } 
+      end
 
       protected
         def method_missing(method, *args, &amp;block)</diff>
      <filename>vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb</filename>
    </modified>
    <modified>
      <diff>@@ -575,7 +575,7 @@ module ActiveRecord #:nodoc:
 
       # Specifies that the attribute by the name of +attr_name+ should be serialized before saving to the database and unserialized
       # after loading from the database. The serialization is done through YAML. If +class_name+ is specified, the serialized
-      # object must be of that class on retrieval or +SerializationTypeMismatch+ will be raised.
+      # object must be of that class on retrieval, or nil. Otherwise, +SerializationTypeMismatch+ will be raised.
       def serialize(attr_name, class_name = Object)
         serialized_attributes[attr_name.to_s] = class_name
       end
@@ -1188,6 +1188,9 @@ module ActiveRecord #:nodoc:
         #
         # It's even possible to use all the additional parameters to find. For example, the full interface for find_all_by_amount
         # is actually find_all_by_amount(amount, options).
+        #
+        # This also enables you to initialize a record if it is not found, such as find_or_initialize_by_amount(amount) 
+        # or find_or_create_by_user_and_password(user, password).
         def method_missing(method_id, *arguments)
           if match = /^find_(all_by|by)_([_a-zA-Z]\w*)$/.match(method_id.to_s)
             finder, deprecated_finder = determine_finder(match), determine_deprecated_finder(match)
@@ -1957,7 +1960,7 @@ module ActiveRecord #:nodoc:
       def unserialize_attribute(attr_name)
         unserialized_object = object_from_yaml(@attributes[attr_name])
 
-        if unserialized_object.is_a?(self.class.serialized_attributes[attr_name])
+        if unserialized_object.is_a?(self.class.serialized_attributes[attr_name]) || unserialized_object.nil?
           @attributes[attr_name] = unserialized_object
         else
           raise SerializationTypeMismatch,
@@ -2156,7 +2159,13 @@ module ActiveRecord #:nodoc:
 
       def clone_attribute_value(reader_method, attribute_name)
         value = send(reader_method, attribute_name)
-        value.clone
+
+        case value
+        when nil, Fixnum, true, false
+          value
+        else
+          value.clone
+        end
       rescue TypeError, NoMethodError
         value
       end</diff>
      <filename>vendor/rails/activerecord/lib/active_record/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -242,8 +242,8 @@ module ActiveRecord
           options.assert_valid_keys(CALCULATIONS_OPTIONS)
         end
 
-        # converts a given key to the value that the database adapter returns as
-        #
+        # Converts a given key to the value that the database adapter returns as
+        # as a usable column name.
         #   users.id #=&gt; users_id
         #   sum(id) #=&gt; sum_id
         #   count(distinct users.id) #=&gt; count_distinct_users_id</diff>
      <filename>vendor/rails/activerecord/lib/active_record/calculations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ module ActiveRecord
           when Float, Fixnum, Bignum    then value.to_s
           # BigDecimals need to be output in a non-normalized form and quoted.
           when BigDecimal               then value.to_s('F')
-          when Date                     then &quot;'#{value.to_s}'&quot;
+          when Date                     then &quot;'#{value.to_s(:db)}'&quot;
           when Time, DateTime           then &quot;'#{quoted_date(value)}'&quot;
           else                          &quot;'#{quote_string(value.to_yaml)}'&quot;
         end</diff>
      <filename>vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb</filename>
    </modified>
    <modified>
      <diff>@@ -320,6 +320,7 @@ begin
                    decode(data_type, 'NUMBER', data_precision,
                                      'FLOAT', data_precision,
                                      'VARCHAR2', data_length,
+                                     'CHAR', data_length,
                                       null) as limit,
                    decode(data_type, 'NUMBER', data_scale, null) as scale
               from all_tab_columns</diff>
      <filename>vendor/rails/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -68,7 +68,7 @@ module ActiveRecord
     class SQLiteColumn &lt; Column #:nodoc:
       class &lt;&lt;  self
         def string_to_binary(value)
-          value.gsub(/\0|\%/) do |b|
+          value.gsub(/\0|\%/n) do |b|
             case b
               when &quot;\0&quot; then &quot;%00&quot;
               when &quot;%&quot;  then &quot;%25&quot;
@@ -77,7 +77,7 @@ module ActiveRecord
         end
         
         def binary_to_string(value)
-          value.gsub(/%00|%25/) do |b|
+          value.gsub(/%00|%25/n) do |b|
             case b
               when &quot;%00&quot; then &quot;\0&quot;
               when &quot;%25&quot; then &quot;%&quot;</diff>
      <filename>vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module ActiveRecord
   class Base
     class &lt;&lt; self
-      # This method is deprecated in favor of find with the :conditions option.
+      # DEPRECATION NOTICE: This method is deprecated in favor of find with the :conditions option.
       #
       # Works like find, but the record matching +id+ must also meet the +conditions+.
       # +RecordNotFound+ is raised if no record can be found matching the +id+ or meeting the condition.
@@ -12,7 +12,7 @@ module ActiveRecord
       end
       deprecate :find_on_conditions =&gt; &quot;use find(ids, :conditions =&gt; conditions)&quot;
 
-      # This method is deprecated in favor of find(:first, options).
+      # DEPRECATION NOTICE: This method is deprecated in favor of find(:first, options).
       #
       # Returns the object for the first record responding to the conditions in +conditions+, 
       # such as &quot;group = 'master'&quot;. If more than one record is returned from the query, it's the first that'll
@@ -24,7 +24,7 @@ module ActiveRecord
       end
       deprecate :find_first =&gt; &quot;use find(:first, ...)&quot;
 
-      # This method is deprecated in favor of find(:all, options).
+      # DEPRECATION NOTICE: This method is deprecated in favor of find(:all, options).
       #
       # Returns an array of all the objects that could be instantiated from the associated
       # table in the database. The +conditions+ can be used to narrow the selection of objects (WHERE-part),</diff>
      <filename>vendor/rails/activerecord/lib/active_record/deprecated_finders.rb</filename>
    </modified>
    <modified>
      <diff>@@ -412,7 +412,7 @@ class Fixture #:nodoc:
     klass = @class_name.constantize rescue nil
 
     list = @fixture.inject([]) do |fixtures, (key, value)|
-      col = klass.columns_hash[key] if klass.kind_of?(ActiveRecord::Base)
+      col = klass.columns_hash[key] if klass.respond_to?(:ancestors) &amp;&amp; klass.ancestors.include?(ActiveRecord::Base)
       fixtures &lt;&lt; ActiveRecord::Base.connection.quote(value, col).gsub('[^\]\\n', &quot;\n&quot;).gsub('[^\]\\r', &quot;\r&quot;)
     end
     list * ', '</diff>
      <filename>vendor/rails/activerecord/lib/active_record/fixtures.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,15 +5,6 @@ module ActiveRecord
   # Timestamping can be turned off by setting
   #   &lt;tt&gt;ActiveRecord::Base.record_timestamps = false&lt;/tt&gt;
   #
-  # Keep in mind that, via inheritance, you can turn off timestamps on a per
-  # model basis by setting &lt;tt&gt;record_timestamps&lt;/tt&gt; to false in the desired
-  # models.
-  #
-  #   class Feed &lt; ActiveRecord::Base
-  #     self.record_timestamps = false
-  #     # ...
-  #   end
-  #
   # Timestamps are in the local timezone by default but can use UTC by setting
   #   &lt;tt&gt;ActiveRecord::Base.default_timezone = :utc&lt;/tt&gt;
   module Timestamp</diff>
      <filename>vendor/rails/activerecord/lib/active_record/timestamp.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module ActiveRecord
   module VERSION #:nodoc:
     MAJOR = 1
     MINOR = 15
-    TINY  = 3
+    TINY  = 5
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>vendor/rails/activerecord/lib/active_record/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -168,6 +168,12 @@ class EagerAssociationTest &lt; Test::Unit::TestCase
     posts = Post.find(:all, :include =&gt; [ :author, :comments ], :limit =&gt; 2, :conditions =&gt; &quot;posts.title = 'magic forest'&quot;)
     assert_equal 0, posts.size
   end
+  
+  def test_eager_count_performed_on_a_has_many_association_with_multi_table_conditional
+    author = authors(:david)
+    author_posts_without_comments = author.posts.select { |post| post.comments.blank? }
+    assert_equal author_posts_without_comments.size, author.posts.count(:all, :include =&gt; :comments, :conditions =&gt; 'comments.id is null')
+  end
 
   def test_eager_with_has_and_belongs_to_many_and_limit
     posts = Post.find(:all, :include =&gt; :categories, :order =&gt; &quot;posts.id&quot;, :limit =&gt; 3)
@@ -271,6 +277,13 @@ class EagerAssociationTest &lt; Test::Unit::TestCase
     assert_not_nil f.account
     assert_equal companies(:first_firm, :reload).account, f.account
   end
+  
+  def test_eager_with_multi_table_conditional_properly_counts_the_records_when_using_size
+    author = authors(:david)
+    posts_with_no_comments = author.posts.select { |post| post.comments.blank? }
+    assert_equal posts_with_no_comments.size, author.posts_with_no_comments.size
+    assert_equal posts_with_no_comments, author.posts_with_no_comments
+  end
 
   def test_eager_with_invalid_association_reference
     assert_raises(ActiveRecord::ConfigurationError, &quot;Association was not found; perhaps you misspelled it?  You specified :include =&gt; :monkeys&quot;) {</diff>
      <filename>vendor/rails/activerecord/test/associations/eager_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,16 @@ class AssociationsJoinModelTest &lt; Test::Unit::TestCase
     assert_equal 2, authors(:mary).categorized_posts.size
     assert_equal 1, authors(:mary).unique_categorized_posts.size
   end
-
+  
+  def test_has_many_uniq_through_count
+    author = authors(:mary)
+    assert !authors(:mary).unique_categorized_posts.loaded?
+    assert_queries(1) { assert_equal 1, author.unique_categorized_posts.count }
+    assert_queries(1) { assert_equal 1, author.unique_categorized_posts.count(:title, {}) }
+    assert_queries(1) { assert_equal 0, author.unique_categorized_posts.count(:title, { :conditions =&gt; &quot;title is NULL&quot; }) }
+    assert !authors(:mary).unique_categorized_posts.loaded?
+  end
+  
   def test_polymorphic_has_many
     assert posts(:welcome).taggings.include?(taggings(:welcome_general))
   end</diff>
      <filename>vendor/rails/activerecord/test/associations/join_model_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -67,8 +67,8 @@ class AssociationsTest &lt; Test::Unit::TestCase
 end
 
 class AssociationProxyTest &lt; Test::Unit::TestCase
-  fixtures :authors, :posts
-  
+  fixtures :authors, :posts, :developers, :projects, :developers_projects
+
   def test_proxy_accessors
     welcome = posts(:welcome)
     assert_equal  welcome, welcome.author.proxy_owner
@@ -87,6 +87,19 @@ class AssociationProxyTest &lt; Test::Unit::TestCase
     david.posts_with_extension.first   # force load target
     assert_equal  david.posts_with_extension, david.posts_with_extension.testing_proxy_target
   end
+
+  def test_save_on_parent_does_not_load_target
+    david = developers(:david)
+
+    assert !david.projects.loaded?
+    david.update_attribute(:created_at, Time.now)
+    assert !david.projects.loaded?
+  end
+
+  def test_save_on_parent_saves_children
+    developer = Developer.create :name =&gt; &quot;Bryan&quot;, :salary =&gt; 50_000
+    assert_equal 1, developer.reload.audit_logs.size
+  end
 end
 
 class HasOneAssociationsTest &lt; Test::Unit::TestCase
@@ -583,6 +596,13 @@ class HasManyAssociationsTest &lt; Test::Unit::TestCase
     assert_equal 3, first_firm.plain_clients.size
   end
   
+  def test_regular_create_on_has_many_when_parent_is_new_raises
+    assert_deprecated(/.build instead/) do
+      firm = Firm.new
+      firm.plain_clients.create :name=&gt;&quot;Whoever&quot;
+    end
+  end
+
   def test_adding_a_mismatch_class
     assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm &lt;&lt; nil }
     assert_raises(ActiveRecord::AssociationTypeMismatch) { companies(:first_firm).clients_of_firm &lt;&lt; 1 }
@@ -1007,7 +1027,20 @@ class BelongsToAssociationsTest &lt; Test::Unit::TestCase
     citibank.firm = apple
     assert_equal apple.id, citibank.firm_id
   end
-  
+
+  def test_no_unexpected_aliasing
+    first_firm = companies(:first_firm)
+    another_firm = companies(:another_firm)
+
+    citibank = Account.create(&quot;credit_limit&quot; =&gt; 10)
+    citibank.firm = first_firm
+    original_proxy = citibank.firm
+    citibank.firm = another_firm
+
+    assert_equal first_firm.object_id, original_proxy.object_id
+    assert_equal another_firm.object_id, citibank.firm.object_id
+  end
+
   def test_creating_the_belonging_object
     citibank = Account.create(&quot;credit_limit&quot; =&gt; 10)
     apple    = citibank.create_firm(&quot;name&quot; =&gt; &quot;Apple&quot;)</diff>
      <filename>vendor/rails/activerecord/test/associations_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1086,16 +1086,29 @@ class BasicsTest &lt; Test::Unit::TestCase
     assert_equal(myobj, topic.content)
   end
 
-  def test_serialized_attribute_with_class_constraint
+  def test_nil_serialized_attribute_with_class_constraint
     myobj = MyObject.new('value1', 'value2')
-    topic = Topic.create(&quot;content&quot; =&gt; myobj)
-    Topic.serialize(:content, Hash)
+    topic = Topic.new
+    assert_nil topic.content
+  end
 
+  def test_should_raise_exception_on_serialized_attribute_with_type_mismatch
+    myobj = MyObject.new('value1', 'value2')
+    topic = Topic.new(:content =&gt; myobj)
+    assert topic.save
+    Topic.serialize(:content, Hash)
     assert_raise(ActiveRecord::SerializationTypeMismatch) { Topic.find(topic.id).content }
+  ensure
+    Topic.serialize(:content)
+  end
 
+  def test_serialized_attribute_with_class_constraint
     settings = { &quot;color&quot; =&gt; &quot;blue&quot; }
-    Topic.find(topic.id).update_attribute(&quot;content&quot;, settings)
+    Topic.serialize(:content, Hash)
+    topic = Topic.new(:content =&gt; settings)
+    assert topic.save
     assert_equal(settings, Topic.find(topic.id).content)
+  ensure
     Topic.serialize(:content)
   end
 </diff>
      <filename>vendor/rails/activerecord/test/base_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,6 +25,7 @@ class Author &lt; ActiveRecord::Base
 
   has_many :hello_posts, :class_name =&gt; &quot;Post&quot;, :conditions =&gt; &quot;posts.body = 'hello'&quot;
   has_many :hello_post_comments, :through =&gt; :hello_posts, :source =&gt; :comments
+  has_many :posts_with_no_comments, :class_name =&gt; 'Post', :conditions =&gt; 'comments.id is null', :include =&gt; :comments
 
   has_many :other_posts,          :class_name =&gt; &quot;Post&quot;
   has_many :posts_with_callbacks, :class_name =&gt; &quot;Post&quot;, :before_add =&gt; :log_before_adding,</diff>
      <filename>vendor/rails/activerecord/test/fixtures/author.rb</filename>
    </modified>
    <modified>
      <diff>@@ -57,4 +57,9 @@ ActiveRecord::Schema.define do
   create_table :lock_without_defaults_cust, :force =&gt; true do |t|
     t.column :custom_lock_version, :integer
   end
+  
+  create_table :audit_logs, :force =&gt; true do |t|
+    t.column :message, :string, :null=&gt;false
+    t.column :developer_id, :integer, :null=&gt;false
+  end
 end</diff>
      <filename>vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,8 +31,18 @@ class Developer &lt; ActiveRecord::Base
 
   has_and_belongs_to_many :special_projects, :join_table =&gt; 'developers_projects', :association_foreign_key =&gt; 'project_id'
 
+  has_many :audit_logs
+
   validates_inclusion_of :salary, :in =&gt; 50000..200000
   validates_length_of    :name, :within =&gt; 3..20
+
+  before_create do |developer|
+    developer.audit_logs.build :message =&gt; &quot;Computer created&quot;
+  end
+end
+
+class AuditLog &lt; ActiveRecord::Base
+  belongs_to :developer
 end
 
 DeveloperSalary = Struct.new(:amount)</diff>
      <filename>vendor/rails/activerecord/test/fixtures/developer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,13 +12,15 @@ class FixturesTest &lt; Test::Unit::TestCase
   self.use_instantiated_fixtures = true
   self.use_transactional_fixtures = false
 
-  fixtures :topics, :developers, :accounts, :tasks, :categories, :funny_jokes
+  fixtures :topics, :developers, :accounts, :tasks, :categories, :funny_jokes, :binaries
 
-  FIXTURES = %w( accounts companies customers
+  FIXTURES = %w( accounts binaries companies customers
                  developers developers_projects entrants
                  movies projects subscribers topics tasks )
   MATCH_ATTRIBUTE_NAME = /[a-zA-Z][-_\w]*/
 
+  BINARY_FIXTURE_PATH = File.dirname(__FILE__) + '/fixtures/flowers.jpg'
+
   def test_clean_fixtures
     FIXTURES.each do |name|
       fixtures = nil
@@ -100,7 +102,6 @@ class FixturesTest &lt; Test::Unit::TestCase
     assert first
   end
 
-
   def test_bad_format
     path = File.join(File.dirname(__FILE__), 'fixtures', 'bad_fixtures')
     Dir.entries(path).each do |file|
@@ -174,7 +175,6 @@ class FixturesTest &lt; Test::Unit::TestCase
     end
   end
 
-
   def test_yml_file_in_subdirectory
     assert_equal(categories(:sub_special_1).name, &quot;A special category in a subdir file&quot;)
     assert_equal(categories(:sub_special_1).class, SpecialCategory)
@@ -185,7 +185,11 @@ class FixturesTest &lt; Test::Unit::TestCase
     assert_equal(categories(:sub_special_3).class, SpecialCategory)
   end
 
-
+  def test_binary_in_fixtures
+    assert_equal 1, @binaries.size
+    data = File.read(BINARY_FIXTURE_PATH).freeze
+    assert_equal data, @flowers.data
+  end
 end
 
 if Account.connection.respond_to?(:reset_pk_sequence!)</diff>
      <filename>vendor/rails/activerecord/test/fixtures_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -170,7 +170,7 @@ if ActiveRecord::Base.connection.supports_migrations?
     # SQL Server and Sybase will not allow you to add a NOT NULL column
     # to a table without specifying a default value, so the
     # following test must be skipped
-    unless current_adapter?(:SQLServerAdapter, :SybaseAdapter)
+    unless current_adapter?(:SQLServerAdapter, :SybaseAdapter, :SQLiteAdapter)
       def test_add_column_not_null_without_default
         Person.connection.create_table :testings do |t|
           t.column :foo, :string
@@ -209,7 +209,7 @@ if ActiveRecord::Base.connection.supports_migrations?
     def test_native_decimal_insert_manual_vs_automatic
       # SQLite3 always uses float in violation of SQL
       # 16 decimal places
-      correct_value = (current_adapter?(:SQLiteAdapter) ? '0.123456789012346E20' : '0012345678901234567890.0123456789').to_d
+      correct_value = '0012345678901234567890.0123456789'.to_d
 
       Person.delete_all
       Person.connection.add_column &quot;people&quot;, &quot;wealth&quot;, :decimal, :precision =&gt; '30', :scale =&gt; '10'
@@ -227,8 +227,9 @@ if ActiveRecord::Base.connection.supports_migrations?
       assert_kind_of BigDecimal, row.wealth
 
       # If this assert fails, that means the SELECT is broken!
-      assert_equal correct_value, row.wealth
-
+      unless current_adapter?(:SQLite3Adapter)
+        assert_equal correct_value, row.wealth
+      end
       # Reset to old state
       Person.delete_all
 
@@ -240,8 +241,9 @@ if ActiveRecord::Base.connection.supports_migrations?
       assert_kind_of BigDecimal, row.wealth
 
       # If these asserts fail, that means the INSERT (create function, or cast to SQL) is broken!
-      assert_equal correct_value, row.wealth
-
+      unless current_adapter?(:SQLite3Adapter)
+        assert_equal correct_value, row.wealth
+      end
       # Reset to old state
       Person.connection.del_column &quot;people&quot;, &quot;wealth&quot; rescue nil
       Person.reset_column_information
@@ -267,10 +269,7 @@ if ActiveRecord::Base.connection.supports_migrations?
 
       # Test for 30 significent digits (beyond the 16 of float), 10 of them
       # after the decimal place.
-      if current_adapter?(:SQLiteAdapter)
-        # SQLite3 uses float in violation of SQL. Test for 16 decimal places.
-        assert_equal BigDecimal.new('0.123456789012346E20'), bob.wealth
-      else
+      unless current_adapter?(:SQLite3Adapter)
         assert_equal BigDecimal.new(&quot;0012345678901234567890.0123456789&quot;), bob.wealth
       end
 </diff>
      <filename>vendor/rails/activerecord/test/migration_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -211,6 +211,53 @@ class ListTest &lt; Test::Unit::TestCase
     assert_equal [new2, new1, new3], ListMixin.find(:all, :conditions =&gt; 'parent_id IS NULL', :order =&gt; 'pos')
   end
 
+  def test_remove_from_list_should_then_fail_in_list?
+    assert_equal true, mixins(:list_1).in_list?
+    mixins(:list_1).remove_from_list
+    assert_equal false, mixins(:list_1).in_list?
+  end
+
+  def test_remove_from_list_should_set_position_to_nil
+    assert_equal [mixins(:list_1),
+                  mixins(:list_2),
+                  mixins(:list_3),
+                  mixins(:list_4)],
+                  ListMixin.find(:all, :conditions =&gt; 'parent_id = 5', :order =&gt; 'pos')
+
+    mixins(:list_2).remove_from_list
+
+    assert_equal [mixins(:list_2, :reload),
+                  mixins(:list_1, :reload),
+                  mixins(:list_3, :reload),
+                  mixins(:list_4, :reload)],
+                  ListMixin.find(:all, :conditions =&gt; 'parent_id = 5', :order =&gt; 'pos')
+
+    assert_equal 1, mixins(:list_1).pos
+    assert_equal nil, mixins(:list_2).pos
+    assert_equal 2, mixins(:list_3).pos
+    assert_equal 3, mixins(:list_4).pos
+  end
+
+  def test_remove_before_destroy_does_not_shift_lower_items_twice
+    assert_equal [mixins(:list_1),
+                  mixins(:list_2),
+                  mixins(:list_3),
+                  mixins(:list_4)],
+                  ListMixin.find(:all, :conditions =&gt; 'parent_id = 5', :order =&gt; 'pos')
+
+    mixins(:list_2).remove_from_list
+    mixins(:list_2).destroy
+
+  assert_equal [mixins(:list_1, :reload),
+                mixins(:list_3, :reload),
+                mixins(:list_4, :reload)],
+                  ListMixin.find(:all, :conditions =&gt; 'parent_id = 5', :order =&gt; 'pos')
+
+    assert_equal 1, mixins(:list_1).pos
+    assert_equal 2, mixins(:list_3).pos
+    assert_equal 3, mixins(:list_4).pos
+  end
+
 end
 
 class TreeTest &lt; Test::Unit::TestCase</diff>
      <filename>vendor/rails/activerecord/test/mixin_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -631,7 +631,7 @@ class ValidationsTest &lt; Test::Unit::TestCase
     t = Topic.new('title' =&gt; 'noreplies', 'content' =&gt; 'whatever')
     assert !t.save
     assert t.errors.on(:replies)
-    t.replies.create('title' =&gt; 'areply', 'content' =&gt; 'whateveragain')
+    t.replies.build('title' =&gt; 'areply', 'content' =&gt; 'whateveragain')
     assert t.valid?
   end
 
@@ -824,7 +824,7 @@ class ValidationsTest &lt; Test::Unit::TestCase
       t = Topic.new('title' =&gt; '&#12354;&#12356;&#12358;&#12360;&#12362;', 'content' =&gt; '&#12363;&#12365;&#12367;&#12369;&#12371;')
       assert !t.save
       assert t.errors.on(:replies)
-      t.replies.create('title' =&gt; '&#12354;&#12356;&#12358;&#12360;&#12362;', 'content' =&gt; '&#12363;&#12365;&#12367;&#12369;&#12371;')
+      t.replies.build('title' =&gt; '&#12354;&#12356;&#12358;&#12360;&#12362;', 'content' =&gt; '&#12363;&#12365;&#12367;&#12369;&#12371;')
       assert t.valid?
     end
   end</diff>
      <filename>vendor/rails/activerecord/test/validations_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,19 @@
+*1.4.4* (October 12th, 2007)
+
+* Backport: allow array and hash query parameters. Array route parameters are converted/to/a/path as before.  #6765, #7047, #7462 [bgipsy, Jeremy McAnally, Dan Kubb, brendan, Diego Algorta Casamayou]
+
+
+*1.4.3* (October 4th, 2007)
+
+* Demote Hash#to_xml to use XmlSimple#xml_in_string so it can't read files or stdin.  #8453 [candlerb, Jeremy Kemper]
+
+* Document Object#blank?.  #6491 [Chris Mear]
+
+* Update Dependencies to ignore constants inherited from ancestors. Closes #6951. [Nicholas Seckar]
+
+* Improved multibyte performance by relying less on exception raising #8159 [Blaine]
+
+
 *1.4.2* (March 12th, 2007)
 
 * Ruby 1.8.6 and 1.9 define private Time#to_date and #to_datetime; make them</diff>
      <filename>vendor/rails/activesupport/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,11 @@
-class Object #:nodoc:
-  # &quot;&quot;, &quot;   &quot;, nil, [], and {} are blank
+class Object
+  # An object is blank if it's nil, empty, or a whitespace string.
+  # For example, &quot;&quot;, &quot;   &quot;, nil, [], and {} are blank.
+  #
+  # This simplifies
+  #   if !address.nil? &amp;&amp; !address.empty?
+  # to
+  #   if !address.blank?
   def blank?
     if respond_to?(:empty?) &amp;&amp; respond_to?(:strip)
       empty? or strip.empty?
@@ -47,4 +53,4 @@ class Numeric #:nodoc:
   def blank?
     false
   end
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/rails/activesupport/lib/active_support/core_ext/blank.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,44 @@
 require 'date'
 require 'xml_simple'
+require 'cgi'
+ 
+# Extensions needed for Hash#to_query
+class Object
+  def to_param #:nodoc:
+    to_s
+  end
+
+  def to_query(key) #:nodoc:
+    &quot;#{CGI.escape(key.to_s)}=#{CGI.escape(to_param.to_s)}&quot;
+  end
+end
+
+class Array
+  def to_query(key) #:nodoc:
+    collect { |value| value.to_query(&quot;#{key}[]&quot;) }.sort * '&amp;'
+  end
+end
+
+# Locked down XmlSimple#xml_in_string
+class XmlSimple
+  # Same as xml_in but doesn't try to smartly shoot itself in the foot.
+  def xml_in_string(string, options = nil)
+    handle_options('in', options)
+
+    @doc = parse(string)
+    result = collapse(@doc.root)
+
+    if @options['keeproot']
+      merge({}, @doc.root.name, result)
+    else
+      result
+    end
+  end
+
+  def self.xml_in_string(string, options = nil)
+    new.xml_in_string(string, options)
+  end
+end
 
 module ActiveSupport #:nodoc:
   module CoreExtensions #:nodoc:
@@ -27,6 +66,12 @@ module ActiveSupport #:nodoc:
           klass.extend(ClassMethods)
         end
 
+        def to_query(namespace = nil)
+          collect do |key, value|
+            value.to_query(namespace ? &quot;#{namespace}[#{key}]&quot; : key)
+          end.sort * '&amp;'
+        end
+
         def to_xml(options = {})
           options[:indent] ||= 2
           options.reverse_merge!({ :builder =&gt; Builder::XmlMarkup.new(:indent =&gt; options[:indent]),
@@ -81,14 +126,14 @@ module ActiveSupport #:nodoc:
         module ClassMethods
           def from_xml(xml)
             # TODO: Refactor this into something much cleaner that doesn't rely on XmlSimple
-            undasherize_keys(typecast_xml_value(XmlSimple.xml_in(xml,
+            undasherize_keys(typecast_xml_value(XmlSimple.xml_in_string(xml,
               'forcearray'   =&gt; false,
               'forcecontent' =&gt; true,
               'keeproot'     =&gt; true,
               'contentkey'   =&gt; '__content__')
-            ))            
+            ))
           end
-          
+
           def create_from_xml(xml)
             ActiveSupport::Deprecation.warn(&quot;Hash.create_from_xml has been renamed to Hash.from_xml&quot;, caller)
             from_xml(xml)</diff>
      <filename>vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,4 +18,18 @@ class Module
     parents &lt;&lt; Object unless parents.include? Object
     parents
   end
+  
+  # Return the constants that have been defined locally by this object and not
+  # in an ancestor. This method may miss some constants if their definition in
+  # the ancestor is identical to their definition in the receiver.
+  def local_constants
+    inherited = {}
+    ancestors.each do |anc|
+      next if anc == self
+      anc.constants.each { |const| inherited[const] = anc.const_get(const) }
+    end
+    constants.select do |const|
+      ! inherited.key?(const) || inherited[const].object_id != const_get(const).object_id
+    end
+  end
 end</diff>
      <filename>vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb</filename>
    </modified>
    <modified>
      <diff>@@ -318,13 +318,13 @@ module Dependencies #:nodoc:
     watch_frames = descs.collect do |desc|
       if desc.is_a? Module
         mod_name = desc.name
-        initial_constants = desc.constants
+        initial_constants = desc.local_constants
       elsif desc.is_a?(String) || desc.is_a?(Symbol)
         mod_name = desc.to_s
         
         # Handle the case where the module has yet to be defined.
         initial_constants = if qualified_const_defined?(mod_name)
-          mod_name.constantize.constants
+          mod_name.constantize.local_constants
         else
          []
         end
@@ -349,7 +349,7 @@ module Dependencies #:nodoc:
         
         mod = mod_name.constantize
         next [] unless mod.is_a? Module
-        new_constants = mod.constants - prior_constants
+        new_constants = mod.local_constants - prior_constants
         
         # Make sure no other frames takes credit for these constants.
         constant_watch_stack.each do |frame_name, constants|</diff>
      <filename>vendor/rails/activesupport/lib/active_support/dependencies.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,12 +23,14 @@ module ActiveSupport
         &quot;\n&quot; =&gt;    '\n',
         &quot;\r&quot; =&gt;    '\r',
         &quot;\t&quot; =&gt;    '\t',
-        '&quot;' =&gt;     '\&quot;',
-        '\\' =&gt;    '\\\\'
+        '&quot;'  =&gt;    '\&quot;',
+        '\\' =&gt;    '\\\\',
+        '&lt;'  =&gt;    '\\074',
+        '&gt;'  =&gt;    '\\076'
       }
       
       define_encoder String do |string|
-        '&quot;' + string.gsub(/[\010\f\n\r\t&quot;\\]/) { |s|
+        '&quot;' + string.gsub(/[\010\f\n\r\t&quot;\\&lt;&gt;]/) { |s|
           ESCAPED_CHARS[s]
         }.gsub(/([\xC0-\xDF][\x80-\xBF]|
                  [\xE0-\xEF][\x80-\xBF]{2}|</diff>
      <filename>vendor/rails/activesupport/lib/active_support/json/encoders/core.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,7 @@ module ActiveSupport::Multibyte #:nodoc:
     
     # Create a new Chars instance.
     def initialize(str)
-      @string = (str.string rescue str)
+      @string = str.respond_to?(:string) ? str.string : str
     end
     
     # Returns -1, 0 or +1 depending on whether the Chars object is to be sorted before, equal or after the
@@ -70,18 +70,18 @@ module ActiveSupport::Multibyte #:nodoc:
     def method_missing(m, *a, &amp;b)
       begin
         # Simulate methods with a ! at the end because we can't touch the enclosed string from the handlers.
-        if m.to_s =~ /^(.*)\!$/
+        if m.to_s =~ /^(.*)\!$/ &amp;&amp; handler.respond_to?($1)
           result = handler.send($1, @string, *a, &amp;b)
           if result == @string
             result = nil
           else
             @string.replace result
           end
-        else
+        elsif handler.respond_to?(m)
           result = handler.send(m, @string, *a, &amp;b)
+        else
+          result = @string.send(m, *a, &amp;b)
         end
-      rescue NoMethodError
-        result = @string.send(m, *a, &amp;b)
       rescue Handlers::EncodingError
         @string.replace handler.tidy_bytes(@string)
         retry
@@ -126,4 +126,4 @@ begin
   ActiveSupport::Multibyte::Chars.handler = ActiveSupport::Multibyte::Handlers::UTF8HandlerProc
 rescue LoadError
   ActiveSupport::Multibyte::Chars.handler = ActiveSupport::Multibyte::Handlers::UTF8Handler
-end
\ No newline at end of file
+end</diff>
      <filename>vendor/rails/activesupport/lib/active_support/multibyte/chars.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module ActiveSupport
   module VERSION #:nodoc:
     MAJOR = 1
     MINOR = 4
-    TINY  = 2
+    TINY  = 4
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>vendor/rails/activesupport/lib/active_support/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -470,3 +470,40 @@ class HashToXmlTest &lt; Test::Unit::TestCase
     end
   end
 end
+
+class QueryTest &lt; Test::Unit::TestCase
+  def test_simple_conversion
+    assert_query_equal 'a=10', :a =&gt; 10
+  end
+
+  def test_cgi_escaping
+    assert_query_equal 'a%3Ab=c+d', 'a:b' =&gt; 'c d'
+  end
+
+  def test_nil_parameter_value
+    empty = Object.new 
+    def empty.to_param; nil end
+    assert_query_equal 'a=', 'a' =&gt; empty
+  end
+
+  def test_nested_conversion
+    assert_query_equal 'person%5Bname%5D=Nicholas&amp;person%5Blogin%5D=seckar',
+      :person =&gt; {:name =&gt; 'Nicholas', :login =&gt; 'seckar'}
+  end
+  
+  def test_multiple_nested
+    assert_query_equal 'account%5Bperson%5D%5Bid%5D=20&amp;person%5Bid%5D=10',
+      :person =&gt; {:id =&gt; 10}, :account =&gt; {:person =&gt; {:id =&gt; 20}}
+  end
+  
+  def test_array_values
+    assert_query_equal 'person%5Bid%5D%5B%5D=10&amp;person%5Bid%5D%5B%5D=20',
+      :person =&gt; {:id =&gt; [10, 20]}
+  end
+
+  private
+    def assert_query_equal(expected, actual, message = nil)
+      assert_equal expected.split('&amp;').sort, actual.to_query.split('&amp;').sort
+    end
+end
+</diff>
      <filename>vendor/rails/activesupport/test/core_ext/hash_ext_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,14 @@
 require File.dirname(__FILE__) + '/../abstract_unit'
 
 module One
+  Constant1 = &quot;Hello World&quot;
+  Constant2 = &quot;What's up?&quot;
 end
 
 class Ab
   include One
+  Constant1 = &quot;Hello World&quot; # Will have different object id than One::Constant1
+  Constant3 = &quot;Goodbye World&quot;
 end
 
 module Xy
@@ -91,6 +95,10 @@ class ModuleTest &lt; Test::Unit::TestCase
     assert_equal [Yz::Zy, Yz, Object], Yz::Zy::Cd.parents
     assert_equal [Yz, Object], Yz::Zy.parents
   end
+  
+  def test_local_constants
+    assert_equal %w(Constant1 Constant3), Ab.local_constants.sort
+  end
 
   def test_as_load_path
     assert_equal 'yz/zy', Yz::Zy.as_load_path</diff>
      <filename>vendor/rails/activesupport/test/core_ext/module_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,10 @@ module ModuleWithMissing
   end
 end
 
+module ModuleWithConstant
+  InheritedConstant = &quot;Hello&quot;
+end
+
 class DependenciesTest &lt; Test::Unit::TestCase
   def teardown
     Dependencies.clear
@@ -574,6 +578,13 @@ class DependenciesTest &lt; Test::Unit::TestCase
     Object.send :remove_const, :M rescue nil
   end
 
+  def test_new_constants_in_with_inherited_constants
+    m = Dependencies.new_constants_in(:Object) do
+      Object.send :include, ModuleWithConstant
+    end
+    assert_equal [], m
+  end
+
   def test_file_with_multiple_constants_and_require_dependency
     with_loading 'autoloading_fixtures' do
       assert ! defined?(MultipleConstantFile)</diff>
      <filename>vendor/rails/activesupport/test/dependencies_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,30 @@
+*1.2.5* (October 12th, 2007)
+
+* Correct RAILS_GEM_VERSION regexp. Use =version gem requirement instead of ~&gt;version so you don't get surprised by a beta gem in production. This change means upgrading to 1.2.5 will require a boot.rb upgrade.  [Jeremy Kemper]
+
+* Move custom inflections example so available before route generation.  #6829 [dcmanges, Nate, piotrb]
+
+
+*1.2.4* (October 4th, 2007)
+
+* Add a new rake task to aid debugging of named routes.  
+
+  rake routes
+
+* use Gem.find_name instead of search when freezing gems.  Prevent false positives for other gems with rails in the name. Closes #8729 [wselman]
+
+* Fix syntax error in dispatcher than wrecked failsafe responses.  #8625 [mtitorenko]
+
+* Add Active Resource to rails:freeze:edge and drop Action Web Service.  #8205 [underbluewaters, Jeremy Kemper]
+
+* Give generate scaffold a more descriptive database message.  Closes #7316 [jeremymcanally]
+
+* Canonicalize RAILS_ROOT by using File.expand_path on Windows, which doesn't have to worry about symlinks, and Pathname#realpath elsewhere, which respects symlinks in relative paths but is incompatible with Windows.  #6755 [Jeremy Kemper, trevor]
+
+
 *1.2.3* (March 12th, 2007)
 
-* Ruby 1.8.6 compatibility
+* Ruby 1.8.6 compatibility fixes. Upgrade rake dependency to 0.7.2.
 
 * Windows: include MinGW in RUBY_PLATFORM check.  #2982 [okkez000@gmail.com, Kaspar Schiess]
 </diff>
      <filename>vendor/rails/railties/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -64,9 +64,38 @@ please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
 
 == Debugging Rails
 
-Have &quot;tail -f&quot; commands running on the server.log and development.log. Rails will
-automatically display debugging and runtime information to these files. Debugging
-info will also be shown in the browser on requests from 127.0.0.1.
+Sometimes your application goes wrong.  Fortunately there are a lot of tools that
+will help you debug it and get it back on the rails.
+
+First area to check is the application log files.  Have &quot;tail -f&quot; commands running
+on the server.log and development.log. Rails will automatically display debugging
+and runtime information to these files. Debugging info will also be shown in the
+browser on requests from 127.0.0.1.
+
+You can also log your own messages directly into the log file from your code using
+the Ruby logger class from inside your controllers. Example:
+
+  class WeblogController &lt; ActionController::Base
+    def destroy
+      @weblog = Weblog.find(params[:id])
+      @weblog.destroy
+      logger.info(&quot;#{Time.now} Destroyed Weblog ID ##{@weblog.id}!&quot;)
+    end
+  end
+
+The result will be a message in your log file along the lines of:
+
+  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
+
+More information on how to use the logger is at http://www.ruby-doc.org/core/
+
+Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
+
+* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
+* Learn to Program: http://pine.fm/LearnToProgram/  (a beginners guide)
+
+These two online (and free) books will bring you up to speed on the Ruby language
+and also on programming in general.
 
 
 == Breakpoints</diff>
      <filename>vendor/rails/railties/README</filename>
    </modified>
    <modified>
      <diff>@@ -288,11 +288,11 @@ spec = Gem::Specification.new do |s|
   EOF
 
   s.add_dependency('rake', '&gt;= 0.7.2')
-  s.add_dependency('activesupport',    '= 1.4.2' + PKG_BUILD)
-  s.add_dependency('activerecord',     '= 1.15.3' + PKG_BUILD)
-  s.add_dependency('actionpack',       '= 1.13.3' + PKG_BUILD)
-  s.add_dependency('actionmailer',     '= 1.3.3' + PKG_BUILD)
-  s.add_dependency('actionwebservice', '= 1.2.3' + PKG_BUILD)
+  s.add_dependency('activesupport',    '= 1.4.4' + PKG_BUILD)
+  s.add_dependency('activerecord',     '= 1.15.5' + PKG_BUILD)
+  s.add_dependency('actionpack',       '= 1.13.5' + PKG_BUILD)
+  s.add_dependency('actionmailer',     '= 1.3.5' + PKG_BUILD)
+  s.add_dependency('actionwebservice', '= 1.2.5' + PKG_BUILD)
 
   s.rdoc_options &lt;&lt; '--exclude' &lt;&lt; '.'
   s.has_rdoc = false</diff>
      <filename>vendor/rails/railties/Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,6 @@
 # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
 
-unless defined?(RAILS_ROOT)
-  root_path = File.join(File.dirname(__FILE__), '..')
-
-  unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
-    require 'pathname'
-    root_path = Pathname.new(root_path).cleanpath(true).to_s
-  end
-
-  RAILS_ROOT = root_path
-end
+RAILS_ROOT = &quot;#{File.dirname(__FILE__)}/..&quot; unless defined?(RAILS_ROOT)
 
 unless defined?(Rails::Initializer)
   if File.directory?(&quot;#{RAILS_ROOT}/vendor/rails&quot;)
@@ -17,20 +8,23 @@ unless defined?(Rails::Initializer)
   else
     require 'rubygems'
 
-    environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
-    environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
-    rails_gem_version = $1
+    rails_gem_version =
+      if defined? RAILS_GEM_VERSION
+        RAILS_GEM_VERSION
+      else
+        File.read(&quot;#{File.dirname(__FILE__)}/environment.rb&quot;) =~ /^[^#]*RAILS_GEM_VERSION\s+=\s+'([\d.]+)'/
+        $1
+      end
 
-    if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
-      # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems
-      rails_gem = Gem.cache.search('rails', &quot;~&gt;#{version}.0&quot;).sort_by { |g| g.version.version }.last
+    if rails_gem_version
+      rails_gem = Gem.cache.search('rails', &quot;=#{rails_gem_version}.0&quot;).sort_by { |g| g.version.version }.last
 
       if rails_gem
         gem &quot;rails&quot;, &quot;=#{rails_gem.version.version}&quot;
         require rails_gem.full_gem_path + '/lib/initializer'
       else
-        STDERR.puts %(Cannot find gem for Rails ~&gt;#{version}.0:
-    Install the missing gem with 'gem install -v=#{version} rails', or
+        STDERR.puts %(Cannot find gem for Rails =#{rails_gem_version}.0:
+    Install the missing gem with 'gem install -v=#{rails_gem_version} rails', or
     change environment.rb to define RAILS_GEM_VERSION with your desired version.
   )
         exit 1</diff>
      <filename>vendor/rails/railties/environments/boot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # Be sure to restart your web server when you modify this file.
 
-# Uncomment below to force Rails into production mode when 
+# Uncomment below to force Rails into production mode when
 # you don't control web/app server and can't set it the proper way
 # ENV['RAILS_ENV'] ||= 'production'
 
@@ -12,7 +12,7 @@ require File.join(File.dirname(__FILE__), 'boot')
 
 Rails::Initializer.run do |config|
   # Settings in config/environments/* take precedence over those specified here
-  
+
   # Skip frameworks you're not going to use (only works if using vendor/rails)
   # config.frameworks -= [ :action_web_service, :action_mailer ]
 
@@ -22,7 +22,7 @@ Rails::Initializer.run do |config|
   # Add additional load paths for your own custom dirs
   # config.load_paths += %W( #{RAILS_ROOT}/extras )
 
-  # Force all environments to use the same logger level 
+  # Force all environments to use the same logger level
   # (by default production uses :info, the others :debug)
   # config.log_level = :debug
 
@@ -31,7 +31,7 @@ Rails::Initializer.run do |config|
   # config.action_controller.session_store = :active_record_store
 
   # Use SQL instead of Active Record's schema dumper when creating the test database.
-  # This is necessary if your schema can't be completely dumped by the schema dumper, 
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
   # like if you have constraints or database-specific column types
   # config.active_record.schema_format = :sql
 
@@ -40,21 +40,21 @@ Rails::Initializer.run do |config|
 
   # Make Active Record use UTC-base instead of local time
   # config.active_record.default_timezone = :utc
-  
+
+  # Add new inflection rules using the following format
+  # (all these examples are active by default):
+  # Inflector.inflections do |inflect|
+  #   inflect.plural /^(ox)$/i, '\1en'
+  #   inflect.singular /^(ox)en/i, '\1'
+  #   inflect.irregular 'person', 'people'
+  #   inflect.uncountable %w( fish sheep )
+  # end
+
   # See Rails::Configuration for more options
 end
 
-# Add new inflection rules using the following format 
-# (all these examples are active by default):
-# Inflector.inflections do |inflect|
-#   inflect.plural /^(ox)$/i, '\1en'
-#   inflect.singular /^(ox)en/i, '\1'
-#   inflect.irregular 'person', 'people'
-#   inflect.uncountable %w( fish sheep )
-# end
-
 # Add new mime types for use in respond_to blocks:
 # Mime::Type.register &quot;text/richtext&quot;, :rtf
 # Mime::Type.register &quot;application/x-mobile&quot;, :mobile
 
-# Include your application configuration below
\ No newline at end of file
+# Include your application configuration below</diff>
      <filename>vendor/rails/railties/environments/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,8 +42,7 @@ class Dispatcher
       end
     rescue Exception =&gt; exception  # errors from CGI dispatch
       failsafe_response(output, '500 Internal Server Error', exception) do
-        controller ||= ApplicationController rescue LoadError nil
-        controller ||= ActionController::Base
+        controller ||= (ApplicationController rescue ActionController::Base)
         controller.process_with_exception(request, response, exception).out(output)
       end
     ensure</diff>
      <filename>vendor/rails/railties/lib/dispatcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,11 @@
 require 'logger'
 require 'set'
-require File.join(File.dirname(__FILE__), 'railties_path')
-require File.join(File.dirname(__FILE__), 'rails/version')
+require 'pathname'
+
+$LOAD_PATH.unshift File.dirname(__FILE__)
+require 'railties_path'
+require 'rails/version'
+
 
 RAILS_ENV = (ENV['RAILS_ENV'] || 'development').dup unless defined?(RAILS_ENV)
 
@@ -191,7 +195,7 @@ module Rails
           raise(LoadError, &quot;Cannot find the plugin '#{name}'!&quot;) if path.nil?
           load_plugin path
         end
-      end 
+      end
       $LOAD_PATH.uniq!
     end
 
@@ -201,7 +205,9 @@ module Rails
       silence_warnings do
         config = configuration
         constants = self.class.constants
+        
         eval(IO.read(configuration.environment_path), binding, configuration.environment_path)
+        
         (self.class.constants - constants).each do |const|
           Object.const_set(const, self.class.const_get(const))
         end
@@ -307,10 +313,10 @@ module Rails
 
     def initialize_temporary_directories
       if configuration.frameworks.include?(:action_controller)
-        session_path = &quot;#{RAILS_ROOT}/tmp/sessions/&quot;
+        session_path = &quot;#{configuration.root_path}/tmp/sessions/&quot;
         ActionController::Base.session_options[:tmpdir] = File.exist?(session_path) ? session_path : Dir::tmpdir
 
-        cache_path = &quot;#{RAILS_ROOT}/tmp/cache/&quot;
+        cache_path = &quot;#{configuration.root_path}/tmp/cache/&quot;
         if File.exist?(cache_path)
           ActionController::Base.fragment_cache_store = :file_store, cache_path
         end
@@ -414,6 +420,9 @@ module Rails
   #   config = Rails::Configuration.new
   #   Rails::Initializer.run(:process, config)
   class Configuration
+    # The application's base directory.
+    attr_reader :root_path
+
     # A stub for setting options on ActionController::Base
     attr_accessor :action_controller
 
@@ -497,6 +506,8 @@ module Rails
     # Create a new Configuration instance, initialized with the default
     # values.
     def initialize
+      set_root_path!
+
       self.frameworks                   = default_frameworks
       self.load_paths                   = default_load_paths
       self.load_once_paths              = default_load_once_paths
@@ -516,6 +527,23 @@ module Rails
       end
     end
 
+    # Set the root_path to RAILS_ROOT and canonicalize it.
+    def set_root_path!
+      raise 'RAILS_ROOT is not set' unless defined?(::RAILS_ROOT)
+      raise 'RAILS_ROOT is not a directory' unless File.directory?(::RAILS_ROOT)
+
+      @root_path =
+        # Pathname is incompatible with Windows, but Windows doesn't have
+        # real symlinks so File.expand_path is safe.
+        if RUBY_PLATFORM =~ /(:?mswin|mingw)/
+          File.expand_path(::RAILS_ROOT)
+
+        # Otherwise use Pathname#realpath which respects symlinks.
+        else
+          Pathname.new(::RAILS_ROOT).realpath.to_s
+        end
+    end
+
     # Loads and returns the contents of the #database_configuration_file. The
     # contents of the file are processed via ERB before being sent through
     # YAML::load.
@@ -575,10 +603,6 @@ module Rails
     end
 
     private
-      def root_path
-        ::RAILS_ROOT
-      end
-
       def framework_root_path
         defined?(::RAILS_FRAMEWORK_ROOT) ? ::RAILS_FRAMEWORK_ROOT : &quot;#{root_path}/vendor/rails&quot;
       end</diff>
      <filename>vendor/rails/railties/lib/initializer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module Rails
   module VERSION #:nodoc:
     MAJOR = 1
     MINOR = 2
-    TINY  = 3
+    TINY  = 5
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>vendor/rails/railties/lib/rails/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -173,7 +173,7 @@ class ScaffoldGenerator &lt; Rails::Generator::NamedBase
         sandbox.model_instance = model_instance
         sandbox.instance_variable_set(&quot;@#{singular_name}&quot;, sandbox.model_instance)
       rescue ActiveRecord::StatementInvalid =&gt; e
-        logger.error &quot;Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name})&quot;
+        logger.error &quot;Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name}) named #{class_name.tableize}.&quot;
         raise SystemExit
       end
       sandbox.suffix = suffix</diff>
      <filename>vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,7 @@ class ScaffoldResourceGenerator &lt; Rails::Generator::NamedBase
       m.directory(File.join('app/controllers', controller_class_path))
       m.directory(File.join('app/helpers', controller_class_path))
       m.directory(File.join('app/views', controller_class_path, controller_file_name))
+      m.directory(File.join('app/views/layouts', controller_class_path))
       m.directory(File.join('test/functional', controller_class_path))
       m.directory(File.join('test/unit', class_path))
 </diff>
      <filename>vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-RAILTIES_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..'))
\ No newline at end of file
+RAILTIES_PATH = File.join(File.dirname(__FILE__), '..')</diff>
      <filename>vendor/rails/railties/lib/railties_path.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,8 +7,8 @@ namespace :rails do
       Gem.manage_gems
 
       rails = (version = ENV['VERSION']) ?
-        Gem.cache.search('rails', &quot;= #{version}&quot;).first :
-        Gem.cache.search('rails').sort_by { |g| g.version }.last
+        Gem.cache.find_name('rails', &quot;= #{version}&quot;).first :
+        Gem.cache.find_name('rails').sort_by { |g| g.version }.last
 
       version ||= rails.version
 
@@ -59,8 +59,8 @@ namespace :rails do
 
         touch &quot;vendor/rails/REVISION_#{ENV['REVISION']}&quot;
       end
-      
-      for framework in %w( railties actionpack activerecord actionmailer activesupport actionwebservice )
+
+      for framework in %w(railties actionpack activerecord actionmailer activesupport activeresource)
         system &quot;svn export #{rails_svn}/#{framework} vendor/rails/#{framework}&quot; + (ENV['REVISION'] ? &quot; -r #{ENV['REVISION']}&quot; : &quot;&quot;)
       end
     end</diff>
      <filename>vendor/rails/railties/lib/tasks/framework.rake</filename>
    </modified>
    <modified>
      <diff>@@ -18,8 +18,8 @@ PACKAGES = %w( activesupport activerecord actionpack actionmailer actionwebservi
 end
 
 # Upload rails tgz/zip
-`rubyforge add_release rails rails 'REL #{VERSION}' rails-#{VERSION}.tgz`
-`rubyforge add_release rails rails 'REL #{VERSION}' rails-#{VERSION}.zip`
+`rubyforge add_release rails rails 'REL #{VERSION}' release/rails-#{VERSION}.tgz`
+`rubyforge add_release rails rails 'REL #{VERSION}' release/rails-#{VERSION}.zip`
 
 # Create SVN tag
 puts &quot;Remeber to create SVN tag&quot;</diff>
      <filename>vendor/rails/release.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>de125367b097fce78f2e7ede50bd7b7770e66b45</id>
    </parent>
  </parents>
  <author>
    <name>Jacques Distler</name>
    <email>distler@golem.ph.utexas.edu</email>
  </author>
  <url>http://github.com/parasew/instiki/commit/207fb1f7f204b72fa1d1fded1fc7dc00d98df7a5</url>
  <id>207fb1f7f204b72fa1d1fded1fc7dc00d98df7a5</id>
  <committed-date>2007-10-15T10:16:54-07:00</committed-date>
  <authored-date>2007-10-15T10:16:54-07:00</authored-date>
  <message>New Version

Sync with Latest Instiki Trunk.
Migrate to Rails 1.2.5.
Bump version number.</message>
  <tree>60f8340582013f2c959daa1d72357c211f9bc506</tree>
  <committer>
    <name>Jacques Distler</name>
    <email>distler@golem.ph.utexas.edu</email>
  </committer>
</commit>
