Skip to content
This repository
Browse code

Add release notes

  • Loading branch information...
commit a8ba6773a7c08d0489c8fc9cdc62ebbfe9b8b3aa 1 parent 896058b
Pratik authored October 23, 2008
1,086  railties/doc/guides/html/2_2_release_notes.html
... ...
@@ -0,0 +1,1086 @@
  1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  3
+<head>
  4
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5
+	<title>Ruby on Rails 2.2 Release Notes</title>
  6
+	<!--[if lt IE 8]>
  7
+	<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
  8
+	<![endif]-->
  9
+	<link href="stylesheets/base.css" media="screen" rel="Stylesheet" type="text/css" />
  10
+	<link href="stylesheets/forms.css" media="screen" rel="Stylesheet" type="text/css" />
  11
+	<link href="stylesheets/more.css" media="screen" rel="Stylesheet" type="text/css" />
  12
+	<style type="text/css">
  13
+		div#container {
  14
+	max-width: 900px;
  15
+	padding-bottom: 3em;
  16
+}
  17
+
  18
+div#content {
  19
+	margin-left: 200px;
  20
+}
  21
+
  22
+div#container.notoc {
  23
+	max-width: 600px;
  24
+}
  25
+
  26
+.notoc div#content {
  27
+	margin-left: 0;
  28
+}
  29
+
  30
+pre {
  31
+	line-height: 1.4em;
  32
+}
  33
+
  34
+#content p tt {
  35
+	background: #eeeeee;
  36
+	border: solid 1px #cccccc;
  37
+	padding: 3px;
  38
+}
  39
+
  40
+dt {
  41
+	font-weight: bold;
  42
+}
  43
+
  44
+#content dt tt {
  45
+	font-size: 10pt;
  46
+}
  47
+
  48
+dd {
  49
+	margin-left: 3em;
  50
+}
  51
+
  52
+#content dt tt, #content pre tt {
  53
+	background: none;
  54
+	padding: 0;
  55
+	border: 0;
  56
+}
  57
+
  58
+#content .olist ol {
  59
+	margin-left: 2em;
  60
+}
  61
+
  62
+#header {
  63
+	position: relative;
  64
+	max-width: 840px;
  65
+	margin-left: auto;
  66
+	margin-right: auto;
  67
+}
  68
+
  69
+#header.notoc {
  70
+	max-width: 580px;
  71
+}
  72
+
  73
+#logo {
  74
+	position: absolute;
  75
+	left: 10px;
  76
+	top: 10px;
  77
+	width: 110px;
  78
+	height: 140px;
  79
+}
  80
+
  81
+div#header h1#site_title {
  82
+	background: url('images/ruby_on_rails_by_mike_rundle2.gif') top left no-repeat;
  83
+	position: absolute;
  84
+	width: 392px;
  85
+	height: 55px;
  86
+	left: 145px;
  87
+	top: 20px;
  88
+	margin: 0;
  89
+	padding: 0;
  90
+}
  91
+
  92
+#site_title span {
  93
+	display: none;
  94
+}
  95
+
  96
+#site_title_tagline {
  97
+	display: none;
  98
+}
  99
+
  100
+ul#navMain {
  101
+	position: absolute;
  102
+	margin: 0;
  103
+	padding: 0;
  104
+	top: 97px;
  105
+	left: 145px;
  106
+}
  107
+
  108
+.left-floaty, .right-floaty {
  109
+	padding: 15px;
  110
+}
  111
+
  112
+.admonitionblock,
  113
+.tableblock {
  114
+	margin-left: 1em;
  115
+	margin-right: 1em;
  116
+	margin-top: 0.25em;
  117
+	margin-bottom: 1em;
  118
+}
  119
+
  120
+.admonitionblock .icon {
  121
+	padding-right: 8px;
  122
+}
  123
+
  124
+.admonitionblock .content {
  125
+	border: solid 1px #ffda78;
  126
+	background: #fffebd;
  127
+	padding: 10px;
  128
+	padding-top: 8px;
  129
+	padding-bottom: 8px;
  130
+}
  131
+
  132
+.admonitionblock .title {
  133
+	font-size: 140%;
  134
+	margin-bottom: 0.5em;
  135
+}
  136
+
  137
+.tableblock table {
  138
+	border: solid 1px #aaaaff;
  139
+	background: #f0f0ff;
  140
+}
  141
+
  142
+.tableblock th {
  143
+	background: #e0e0e0;
  144
+}
  145
+
  146
+.tableblock th,
  147
+.tableblock td {
  148
+	padding: 3px;
  149
+	padding-left: 5px;
  150
+	padding-right: 5px;
  151
+}
  152
+
  153
+.sidebarblock {
  154
+	margin-top: 0.25em;
  155
+	margin: 1em;
  156
+	border: solid 1px #ccccbb;
  157
+	padding: 8px;
  158
+	background: #ffffe0;
  159
+}
  160
+
  161
+.sidebarblock .sidebar-title {
  162
+	font-size: 140%;
  163
+	font-weight: 600;
  164
+	margin-bottom: 0.3em;
  165
+}
  166
+
  167
+.sidebarblock .sidebar-content > .para:last-child > p {
  168
+	margin-bottom: 0;
  169
+}
  170
+
  171
+.sidebarblock .sidebar-title a {
  172
+	text-decoration: none;
  173
+}
  174
+
  175
+.sidebarblock .sidebar-title a:hover {
  176
+	text-decoration: underline;
  177
+}
  178
+
  179
+	</style>
  180
+</head>
  181
+<body>
  182
+	<div id="header" >
  183
+		<div id="logo">
  184
+			<a href="index.html" title="Ruby on Rails"><img src="images/rails_logo_remix.gif" alt="Rails" height="140" width="110" /></a>
  185
+		</div>
  186
+		
  187
+		<h1 id="site_title"><span>Ruby on Rails</span></h1>
  188
+		<h2 id="site_title_tagline">Sustainable productivity for web-application development</h2>
  189
+
  190
+		<ul id="navMain">
  191
+			<li class="first-child"><a href="http://www.rubyonrails.org/" title="Ruby on Rails" class="ruby_on_rails">Ruby on Rails</a></li>
  192
+			<li><a class="manuals" href="index.html" title="Manuals Index">Guides Index</a></li>
  193
+		</ul>
  194
+	</div>
  195
+
  196
+	<div id="container">
  197
+		
  198
+		<div id="sidebar">
  199
+			<h2>Chapters</h2>
  200
+			<ol>
  201
+					<li>
  202
+					<a href="#_infrastructure">Infrastructure</a>
  203
+						<ul>
  204
+						
  205
+							<li><a href="#_internationalization">Internationalization</a></li>
  206
+						
  207
+							<li><a href="#_compatibility_with_ruby_1_9_and_jruby">Compatibility with Ruby 1.9 and JRuby</a></li>
  208
+						
  209
+						</ul>
  210
+					</li>
  211
+					<li>
  212
+					<a href="#_documentation">Documentation</a>
  213
+					</li>
  214
+					<li>
  215
+					<a href="#_better_integration_with_http_out_of_the_box_etag_support">Better integration with HTTP : Out of the box ETag support</a>
  216
+					</li>
  217
+					<li>
  218
+					<a href="#_thread_safety">Thread Safety</a>
  219
+					</li>
  220
+					<li>
  221
+					<a href="#_active_record">Active Record</a>
  222
+						<ul>
  223
+						
  224
+							<li><a href="#_transactional_migrations">Transactional Migrations</a></li>
  225
+						
  226
+							<li><a href="#_connection_pooling">Connection Pooling</a></li>
  227
+						
  228
+							<li><a href="#_hashes_for_join_table_conditions">Hashes for Join Table Conditions</a></li>
  229
+						
  230
+							<li><a href="#_new_dynamic_finders">New Dynamic Finders</a></li>
  231
+						
  232
+							<li><a href="#_other_activerecord_changes">Other ActiveRecord Changes</a></li>
  233
+						
  234
+						</ul>
  235
+					</li>
  236
+					<li>
  237
+					<a href="#_action_controller">Action Controller</a>
  238
+						<ul>
  239
+						
  240
+							<li><a href="#_shallow_route_nesting">Shallow Route Nesting</a></li>
  241
+						
  242
+							<li><a href="#_method_arrays_for_member_or_collection_routes">Method Arrays for Member or Collection Routes</a></li>
  243
+						
  244
+							<li><a href="#_other_action_controller_changes">Other Action Controller Changes</a></li>
  245
+						
  246
+						</ul>
  247
+					</li>
  248
+					<li>
  249
+					<a href="#_action_view">Action View</a>
  250
+					</li>
  251
+					<li>
  252
+					<a href="#_action_mailer">Action Mailer</a>
  253
+					</li>
  254
+					<li>
  255
+					<a href="#_active_support">Active Support</a>
  256
+						<ul>
  257
+						
  258
+							<li><a href="#_memoization">Memoization</a></li>
  259
+						
  260
+							<li><a href="#_tt_each_with_object_tt"><tt>each_with_object</tt></a></li>
  261
+						
  262
+							<li><a href="#_delegates_with_prefixes">Delegates With Prefixes</a></li>
  263
+						
  264
+							<li><a href="#_other_active_support_changes">Other Active Support Changes</a></li>
  265
+						
  266
+						</ul>
  267
+					</li>
  268
+					<li>
  269
+					<a href="#_railties">Railties</a>
  270
+						<ul>
  271
+						
  272
+							<li><a href="#_tt_config_gems_tt"><tt>config.gems</tt></a></li>
  273
+						
  274
+							<li><a href="#_other_railties_changes">Other Railties Changes</a></li>
  275
+						
  276
+						</ul>
  277
+					</li>
  278
+					<li>
  279
+					<a href="#_deprecated">Deprecated</a>
  280
+					</li>
  281
+					<li>
  282
+					<a href="#_credits">Credits</a>
  283
+					</li>
  284
+			</ol>
  285
+		</div>
  286
+		
  287
+		<div id="content">
  288
+				<h1>Ruby on Rails 2.2 Release Notes</h1>
  289
+			<div id="preamble">
  290
+<div class="sectionbody">
  291
+<div class="para"><p>Rails 2.2 delivers a number of new and improved features. This list covers the major upgrades, but doesn't include every little bug fix and change. If you want to see everything, check out the <a href="http://github.com/rails/rails/commits/master">list of commits</a> in the main Rails repository on GitHub.</p></div>
  292
+<div class="para"><p>Along with Rails, 2.2 marks the launch of the <a href="http://guides.rubyonrails.org/">Ruby on Rails Guides</a>, the first results of the ongoing <a href="http://hackfest.rubyonrails.org/guide">Rails Guides hackfest</a>. This site will deliver high-quality documentation of the major features of Rails.</p></div>
  293
+</div>
  294
+</div>
  295
+<h2 id="_infrastructure">1. Infrastructure</h2>
  296
+<div class="sectionbody">
  297
+<div class="para"><p>Rails 2.2 is a significant release for the infrastructure that keeps Rails humming along and connected to the rest of the world.</p></div>
  298
+<h3 id="_internationalization">1.1. Internationalization</h3>
  299
+<div class="para"><p>Rails 2.2 supplies an easy system for internationalization (or i18n, for those of you tired of typing).</p></div>
  300
+<div class="ilist"><ul>
  301
+<li>
  302
+<p>
  303
+Lead Contributors: Rails i18 Team
  304
+</p>
  305
+</li>
  306
+<li>
  307
+<p>
  308
+More information :
  309
+</p>
  310
+<div class="ilist"><ul>
  311
+<li>
  312
+<p>
  313
+<a href="http://rails-i18n.org">Official Rails i18 website</a>
  314
+</p>
  315
+</li>
  316
+<li>
  317
+<p>
  318
+<a href="http://www.artweb-design.de/2008/7/18/finally-ruby-on-rails-gets-internationalized">Finally. Ruby on Rails gets internationalized</a>
  319
+</p>
  320
+</li>
  321
+<li>
  322
+<p>
  323
+<a href="http://i18n-demo.phusion.nl">Localizing Rails : Demo application</a>
  324
+</p>
  325
+</li>
  326
+</ul></div>
  327
+</li>
  328
+</ul></div>
  329
+<h3 id="_compatibility_with_ruby_1_9_and_jruby">1.2. Compatibility with Ruby 1.9 and JRuby</h3>
  330
+<div class="para"><p>Along with thread safety, a lot of work has been done to make Rails work well with JRuby and the upcoming Ruby 1.9. With Ruby 1.9 being a moving target, running edge Rails on edge Ruby is still a hit-or-miss proposition, but Rails is ready to make the transition to Ruby 1.9 when the latter is released.</p></div>
  331
+</div>
  332
+<h2 id="_documentation">2. Documentation</h2>
  333
+<div class="sectionbody">
  334
+<div class="para"><p>The internal documentation of Rails, in the form of code comments, has been improved in numerous places. In addition, the <a href="http://guides.rubyonrails.org/">Ruby on Rails Guides</a> project is the definitive source for information on major Rails components. In its first official release, the Guides page includes:</p></div>
  335
+<div class="ilist"><ul>
  336
+<li>
  337
+<p>
  338
+Getting Started with Rails
  339
+</p>
  340
+</li>
  341
+<li>
  342
+<p>
  343
+Rails Database Migrations
  344
+</p>
  345
+</li>
  346
+<li>
  347
+<p>
  348
+Active Record Associations
  349
+</p>
  350
+</li>
  351
+<li>
  352
+<p>
  353
+Active Record Finders
  354
+</p>
  355
+</li>
  356
+<li>
  357
+<p>
  358
+Layouts and Rendering in Rails
  359
+</p>
  360
+</li>
  361
+<li>
  362
+<p>
  363
+Action View Form Helpers
  364
+</p>
  365
+</li>
  366
+<li>
  367
+<p>
  368
+Rails Routing from the Outside In
  369
+</p>
  370
+</li>
  371
+<li>
  372
+<p>
  373
+Basics of Action Controller
  374
+</p>
  375
+</li>
  376
+<li>
  377
+<p>
  378
+Rails Caching
  379
+</p>
  380
+</li>
  381
+<li>
  382
+<p>
  383
+Testing Rails Applications
  384
+</p>
  385
+</li>
  386
+<li>
  387
+<p>
  388
+Securing Rails Applications
  389
+</p>
  390
+</li>
  391
+<li>
  392
+<p>
  393
+Debugging Rails Applications
  394
+</p>
  395
+</li>
  396
+<li>
  397
+<p>
  398
+Benchmarking and Profiling Rails Applications
  399
+</p>
  400
+</li>
  401
+<li>
  402
+<p>
  403
+The Basics of Creating Rails Plugins
  404
+</p>
  405
+</li>
  406
+</ul></div>
  407
+<div class="para"><p>All told, the Guides provide tens of thousands of words of guidance for beginning and intermediate Rails developers.</p></div>
  408
+<div class="para"><p>If you want to these generate guides locally, inside your application:</p></div>
  409
+<div class="listingblock">
  410
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  411
+by Lorenzo Bettini
  412
+http://www.lorenzobettini.it
  413
+http://www.gnu.org/software/src-highlite -->
  414
+<pre><tt>rake doc<span style="color: #990000">:</span>guides
  415
+</tt></pre></div></div>
  416
+<div class="para"><p>This will put the guides inside <tt>RAILS_ROOT/doc/guides</tt> and you may start surfing straight away by opening <tt>RAILS_ROOT/doc/guides/index.html</tt> in your favourite browser.</p></div>
  417
+<div class="ilist"><ul>
  418
+<li>
  419
+<p>
  420
+Lead Contributors: <a href="http://guides.rails.info/authors.html">Rails Documentation Team</a>
  421
+</p>
  422
+</li>
  423
+<li>
  424
+<p>
  425
+Major contributions from <a href="http://advogato.org/person/fxn/diary.html">Xavier Nora</a> and <a href="http://izumi.plan99.net/blog/">Hongli Lai</a>.
  426
+</p>
  427
+</li>
  428
+<li>
  429
+<p>
  430
+More information:
  431
+</p>
  432
+<div class="ilist"><ul>
  433
+<li>
  434
+<p>
  435
+<a href="http://hackfest.rubyonrails.org/guide">Rails Guides hackfest</a>
  436
+</p>
  437
+</li>
  438
+<li>
  439
+<p>
  440
+<a href="http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch">Help improve Rails documentation on Git branch</a>
  441
+</p>
  442
+</li>
  443
+</ul></div>
  444
+</li>
  445
+</ul></div>
  446
+</div>
  447
+<h2 id="_better_integration_with_http_out_of_the_box_etag_support">3. Better integration with HTTP : Out of the box ETag support</h2>
  448
+<div class="sectionbody">
  449
+<div class="para"><p>Supporting the etag and last modified timestamp in HTTP headers means that Rails can now send back an empty response if it gets a request for a resource that hasn't been modified lately. This allows you to check whether a response needs to be sent at all.</p></div>
  450
+<div class="listingblock">
  451
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  452
+by Lorenzo Bettini
  453
+http://www.lorenzobettini.it
  454
+http://www.gnu.org/software/src-highlite -->
  455
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> ArticlesController <span style="color: #990000">&lt;</span> ApplicationController
  456
+  <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> show_with_respond_to_block
  457
+    <span style="color: #009900">@article</span> <span style="color: #990000">=</span> Article<span style="color: #990000">.</span>find<span style="color: #990000">(</span>params<span style="color: #990000">[:</span>id<span style="color: #990000">])</span>
  458
+
  459
+    <span style="font-style: italic"><span style="color: #9A1900"># If the request sends headers that differs from the options provided to stale?, then</span></span>
  460
+    <span style="font-style: italic"><span style="color: #9A1900"># the request is indeed stale and the respond_to block is triggered (and the options</span></span>
  461
+    <span style="font-style: italic"><span style="color: #9A1900"># to the stale? call is set on the response).</span></span>
  462
+    <span style="font-style: italic"><span style="color: #9A1900">#</span></span>
  463
+    <span style="font-style: italic"><span style="color: #9A1900"># If the request headers match, then the request is fresh and the respond_to block is</span></span>
  464
+    <span style="font-style: italic"><span style="color: #9A1900"># not triggered. Instead the default render will occur, which will check the last-modified</span></span>
  465
+    <span style="font-style: italic"><span style="color: #9A1900"># and etag headers and conclude that it only needs to send a "304 Not Modified" instead</span></span>
  466
+    <span style="font-style: italic"><span style="color: #9A1900"># of rendering the template.</span></span>
  467
+    <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> stale?<span style="color: #990000">(:</span>last_modified <span style="color: #990000">=&gt;</span> <span style="color: #009900">@article</span><span style="color: #990000">.</span>published_at<span style="color: #990000">.</span>utc<span style="color: #990000">,</span> <span style="color: #990000">:</span>etag <span style="color: #990000">=&gt;</span> <span style="color: #009900">@article</span><span style="color: #990000">)</span>
  468
+      respond_to <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>wants<span style="color: #990000">|</span>
  469
+        <span style="font-style: italic"><span style="color: #9A1900"># normal response processing</span></span>
  470
+      <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  471
+    <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  472
+  <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  473
+
  474
+  <span style="font-weight: bold"><span style="color: #0000FF">def</span></span> show_with_implied_render
  475
+    <span style="color: #009900">@article</span> <span style="color: #990000">=</span> Article<span style="color: #990000">.</span>find<span style="color: #990000">(</span>params<span style="color: #990000">[:</span>id<span style="color: #990000">])</span>
  476
+
  477
+    <span style="font-style: italic"><span style="color: #9A1900"># Sets the response headers and checks them against the request, if the request is stale</span></span>
  478
+    <span style="font-style: italic"><span style="color: #9A1900"># (i.e. no match of either etag or last-modified), then the default render of the template happens.</span></span>
  479
+    <span style="font-style: italic"><span style="color: #9A1900"># If the request is fresh, then the default render will return a "304 Not Modified"</span></span>
  480
+    <span style="font-style: italic"><span style="color: #9A1900"># instead of rendering the template.</span></span>
  481
+    fresh_when<span style="color: #990000">(:</span>last_modified <span style="color: #990000">=&gt;</span> <span style="color: #009900">@article</span><span style="color: #990000">.</span>published_at<span style="color: #990000">.</span>utc<span style="color: #990000">,</span> <span style="color: #990000">:</span>etag <span style="color: #990000">=&gt;</span> <span style="color: #009900">@article</span><span style="color: #990000">)</span>
  482
+  <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  483
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  484
+</tt></pre></div></div>
  485
+</div>
  486
+<h2 id="_thread_safety">4. Thread Safety</h2>
  487
+<div class="sectionbody">
  488
+<div class="para"><p>The work done to make Rails thread-safe is rolling out in Rails 2.2. Depending on your web server infrastructure, this means you can handle more requests with fewer copies of Rails in memory, leading to better server performance and higher utilization of multiple cores.</p></div>
  489
+<div class="para"><p>To enable multithreaded dispatching in production mode of your application, add the following line in your <tt>config/environments/production.rb</tt>:</p></div>
  490
+<div class="listingblock">
  491
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  492
+by Lorenzo Bettini
  493
+http://www.lorenzobettini.it
  494
+http://www.gnu.org/software/src-highlite -->
  495
+<pre><tt>config<span style="color: #990000">.</span>threadsafe!
  496
+</tt></pre></div></div>
  497
+<div class="ilist"><ul>
  498
+<li>
  499
+<p>
  500
+More information :
  501
+</p>
  502
+<div class="ilist"><ul>
  503
+<li>
  504
+<p>
  505
+<a href="http://weblog.rubyonrails.org/2008/8/16/josh-peek-officially-joins-the-rails-core">Thread safety project announcement</a>
  506
+</p>
  507
+</li>
  508
+<li>
  509
+<p>
  510
+<a href="http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html">Q/A: What Thread-safe Rails Means</a>
  511
+</p>
  512
+</li>
  513
+</ul></div>
  514
+</li>
  515
+</ul></div>
  516
+</div>
  517
+<h2 id="_active_record">5. Active Record</h2>
  518
+<div class="sectionbody">
  519
+<div class="para"><p>There are two big additions to talk about here: transactional migrations and pooled database transactions. There's also a new (and cleaner) syntax for join table conditions, as well as a number of smaller improvements.</p></div>
  520
+<h3 id="_transactional_migrations">5.1. Transactional Migrations</h3>
  521
+<div class="para"><p>Historically, multiple-step Rails migrations have been a source of trouble. If something went wrong during a migration, everything before the error changed the database and everything after the error wasn't applied. Also, the migration version was stored as having been executed, which means that it couldn't be simply rerun by <tt>rake db:migrate:redo</tt> after you fix the problem. Transactional migrations change this by wrapping migration steps in a DDL transaction, so that if any of them fail, the entire migration is undone. In Rails 2.2, transactional migrations are supported <strong>on PostgreSQL only</strong>. The code is extensible to other database types in the future.</p></div>
  522
+<div class="ilist"><ul>
  523
+<li>
  524
+<p>
  525
+Lead Contributor: <a href="http://adam.blog.heroku.com/">Adam Wiggins</a>
  526
+</p>
  527
+</li>
  528
+<li>
  529
+<p>
  530
+More information:
  531
+</p>
  532
+<div class="ilist"><ul>
  533
+<li>
  534
+<p>
  535
+<a href="http://adam.blog.heroku.com/past/2008/9/3/ddl_transactions/">DDL Transactions</a>
  536
+</p>
  537
+</li>
  538
+</ul></div>
  539
+</li>
  540
+</ul></div>
  541
+<h3 id="_connection_pooling">5.2. Connection Pooling</h3>
  542
+<div class="para"><p>Connection pooling lets Rails distribute database requests across a pool of database connections that will grow to a maximum size (by default 5, but you can add a <tt>pool</tt> key to your <tt>database.yml</tt> to adjust this). This helps remove bottlenecks in applications that support many concurrent users. There's also a <tt>wait_timeout</tt> that defaults to 5 seconds before giving up. <tt>ActiveRecord::Base.connection_pool</tt> gives you direct access to the pool if you need it.</p></div>
  543
+<div class="listingblock">
  544
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  545
+by Lorenzo Bettini
  546
+http://www.lorenzobettini.it
  547
+http://www.gnu.org/software/src-highlite -->
  548
+<pre><tt>development<span style="color: #990000">:</span>
  549
+  adapter<span style="color: #990000">:</span> mysql
  550
+  username<span style="color: #990000">:</span> root
  551
+  database<span style="color: #990000">:</span> sample_development
  552
+  pool<span style="color: #990000">:</span> <span style="color: #993399">10</span>
  553
+  wait_timeout<span style="color: #990000">:</span> <span style="color: #993399">10</span>
  554
+</tt></pre></div></div>
  555
+<div class="ilist"><ul>
  556
+<li>
  557
+<p>
  558
+Lead Contributor: <a href="http://blog.nicksieger.com/">Nick Sieger</a>
  559
+</p>
  560
+</li>
  561
+<li>
  562
+<p>
  563
+More information:
  564
+</p>
  565
+<div class="ilist"><ul>
  566
+<li>
  567
+<p>
  568
+<a href="http://ryandaigle.com/articles/2008/9/7/what-s-new-in-edge-rails-connection-pools">What's New in Edge Rails: Connection Pools</a>
  569
+</p>
  570
+</li>
  571
+</ul></div>
  572
+</li>
  573
+</ul></div>
  574
+<h3 id="_hashes_for_join_table_conditions">5.3. Hashes for Join Table Conditions</h3>
  575
+<div class="para"><p>You can now specify conditions on join tables using a hash. This is a big help if you need to query across complex joins.</p></div>
  576
+<div class="listingblock">
  577
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  578
+by Lorenzo Bettini
  579
+http://www.lorenzobettini.it
  580
+http://www.gnu.org/software/src-highlite -->
  581
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> Photo <span style="color: #990000">&lt;</span> ActiveRecord<span style="color: #990000">::</span>Base
  582
+  belongs_to <span style="color: #990000">:</span>Product
  583
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  584
+
  585
+<span style="font-weight: bold"><span style="color: #0000FF">class</span></span> Product <span style="color: #990000">&lt;</span> ActiveRecord<span style="color: #990000">::</span>Base
  586
+  has_many <span style="color: #990000">:</span>products
  587
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  588
+
  589
+<span style="font-style: italic"><span style="color: #9A1900"># Get all products with copyright-free photos:</span></span>
  590
+Product<span style="color: #990000">.</span>find<span style="color: #990000">(:</span>all<span style="color: #990000">,</span> <span style="color: #990000">:</span>joins <span style="color: #990000">=&gt;</span> <span style="color: #990000">:</span>photo<span style="color: #990000">,</span>
  591
+  <span style="color: #990000">:</span>conditions <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">{</span> <span style="color: #990000">:</span>photos <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">{</span> <span style="color: #990000">:</span>copyright <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span> <span style="color: #FF0000">}}</span><span style="color: #990000">)</span>
  592
+</tt></pre></div></div>
  593
+<div class="ilist"><ul>
  594
+<li>
  595
+<p>
  596
+More information:
  597
+</p>
  598
+<div class="ilist"><ul>
  599
+<li>
  600
+<p>
  601
+<a href="http://ryandaigle.com/articles/2008/7/7/what-s-new-in-edge-rails-easy-join-table-conditions">What's New in Edge Rails: Easy Join Table Conditions</a>
  602
+</p>
  603
+</li>
  604
+</ul></div>
  605
+</li>
  606
+</ul></div>
  607
+<h3 id="_new_dynamic_finders">5.4. New Dynamic Finders</h3>
  608
+<div class="para"><p>Two new sets of methods have been added to Active Record's dynamic finders family.</p></div>
  609
+<h4 id="_find_last_by_lt_attributes_gt">5.4.1. find_last_by_&lt;attributes&gt;</h4>
  610
+<div class="para"><p>The <tt>find_last_by_&lt;attribute&gt;</tt> method is equivalent to <tt>Model.last(:conditions &#8658; {:attribute &#8658; value})</tt></p></div>
  611
+<div class="listingblock">
  612
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  613
+by Lorenzo Bettini
  614
+http://www.lorenzobettini.it
  615
+http://www.gnu.org/software/src-highlite -->
  616
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900"># Get the last user who signed up from London</span></span>
  617
+User<span style="color: #990000">.</span>find_last_by_city<span style="color: #990000">(</span><span style="color: #FF0000">'London'</span><span style="color: #990000">)</span>
  618
+</tt></pre></div></div>
  619
+<div class="ilist"><ul>
  620
+<li>
  621
+<p>
  622
+Lead Contributor: <a href="http://www.workingwithrails.com/person/9147-emilio-tagua">Emilio Tagua</a>
  623
+</p>
  624
+</li>
  625
+</ul></div>
  626
+<h4 id="_find_by_lt_attributes_gt">5.4.2. find_by_&lt;attributes&gt;!</h4>
  627
+<div class="para"><p>The new bang! version of <tt>find_by_&lt;attribute&gt;! is equivalent to  +Model.first(:conditions &#8658; {:attribute &#8658; value}) || raise ActiveRecord::RecordNotFound</tt> Instead of returning <tt>nil</tt> if it can't find a matching record, this method will raise an exception if it cannot find a match.</p></div>
  628
+<div class="listingblock">
  629
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  630
+by Lorenzo Bettini
  631
+http://www.lorenzobettini.it
  632
+http://www.gnu.org/software/src-highlite -->
  633
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900"># Raise ActiveRecord::RecordNotFound exception if 'Moby' hasn't signed up yet!</span></span>
  634
+User<span style="color: #990000">.</span>find_by_name!<span style="color: #990000">(</span><span style="color: #FF0000">'Moby'</span><span style="color: #990000">)</span>
  635
+</tt></pre></div></div>
  636
+<div class="ilist"><ul>
  637
+<li>
  638
+<p>
  639
+Lead Contributor: <a href="http://blog.hasmanythrough.com">Josh Susser</a>
  640
+</p>
  641
+</li>
  642
+</ul></div>
  643
+<h3 id="_other_activerecord_changes">5.5. Other ActiveRecord Changes</h3>
  644
+<div class="ilist"><ul>
  645
+<li>
  646
+<p>
  647
+<tt>rake db:migrate:redo</tt> now accepts an optional VERSION to target that specific migration to redo
  648
+</p>
  649
+</li>
  650
+<li>
  651
+<p>
  652
+Set <tt>config.active_record.timestamped_migrations = false</tt> to have migrations with numeric prefix instead of UTC timestamp.
  653
+</p>
  654
+</li>
  655
+<li>
  656
+<p>
  657
+Counter cache columns (for associations declared with <tt>:counter_cache &#8658; true</tt>) do not need to be initialized to zero any longer.
  658
+</p>
  659
+</li>
  660
+<li>
  661
+<p>
  662
+<tt>ActiveRecord::Base.human_name</tt> for an internationalization-aware humane translation of model names
  663
+</p>
  664
+</li>
  665
+</ul></div>
  666
+</div>
  667
+<h2 id="_action_controller">6. Action Controller</h2>
  668
+<div class="sectionbody">
  669
+<div class="para"><p>On the controller side, there are a couple of changes that will help tidy up your routes.</p></div>
  670
+<h3 id="_shallow_route_nesting">6.1. Shallow Route Nesting</h3>
  671
+<div class="para"><p>Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with - but you <em>can</em> supply more information.</p></div>
  672
+<div class="listingblock">
  673
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  674
+by Lorenzo Bettini
  675
+http://www.lorenzobettini.it
  676
+http://www.gnu.org/software/src-highlite -->
  677
+<pre><tt>map<span style="color: #990000">.</span>resources <span style="color: #990000">:</span>publishers<span style="color: #990000">,</span> <span style="color: #990000">:</span>shallow <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span> <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>publisher<span style="color: #990000">|</span>
  678
+  publisher<span style="color: #990000">.</span>resources <span style="color: #990000">:</span>magazines <span style="font-weight: bold"><span style="color: #0000FF">do</span></span> <span style="color: #990000">|</span>magazine<span style="color: #990000">|</span>
  679
+    magazine<span style="color: #990000">.</span>resources <span style="color: #990000">:</span>photos
  680
+  <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  681
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  682
+</tt></pre></div></div>
  683
+<div class="para"><p>This will enable recognition of (among others) these routes:</p></div>
  684
+<div class="listingblock">
  685
+<div class="content">
  686
+<pre><tt>/publishers/1           ==&gt; publisher_path(1)
  687
+/publishers/1/magazines ==&gt; publisher_magazines_path(1)
  688
+/magazines/2            ==&gt; magazine_path(2)
  689
+/magazines/2/photos     ==&gt; magazines_photos_path(2)
  690
+/photos/3               ==&gt; photo_path(3)</tt></pre>
  691
+</div></div>
  692
+<div class="ilist"><ul>
  693
+<li>
  694
+<p>
  695
+Lead Contributor: <a href="http://www.unwwwired.net/">S. Brent Faulkner</a>
  696
+</p>
  697
+</li>
  698
+<li>
  699
+<p>
  700
+More information:
  701
+</p>
  702
+<div class="ilist"><ul>
  703
+<li>
  704
+<p>
  705
+<a href="http://guides.rails.info/routing/routing_outside_in.html#_nested_resources">Rails Routing from the Outside In</a>
  706
+</p>
  707
+</li>
  708
+<li>
  709
+<p>
  710
+<a href="http://ryandaigle.com/articles/2008/9/7/what-s-new-in-edge-rails-shallow-routes">What's New in Edge Rails: Shallow Routes</a>
  711
+</p>
  712
+</li>
  713
+</ul></div>
  714
+</li>
  715
+</ul></div>
  716
+<h3 id="_method_arrays_for_member_or_collection_routes">6.2. Method Arrays for Member or Collection Routes</h3>
  717
+<div class="para"><p>You can now supply an array of methods for new member or collection routes. This removes the annoyance of having to define a route as accepting any verb as soon as you need it to handle more than one. With Rails 2.2, this is a legitimate route declaration:</p></div>
  718
+<div class="listingblock">
  719
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  720
+by Lorenzo Bettini
  721
+http://www.lorenzobettini.it
  722
+http://www.gnu.org/software/src-highlite -->
  723
+<pre><tt>map<span style="color: #990000">.</span>resources <span style="color: #990000">:</span>photos<span style="color: #990000">,</span> <span style="color: #990000">:</span>collection <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">{</span> <span style="color: #990000">:</span>search <span style="color: #990000">=&gt;</span> <span style="color: #990000">[:</span>get<span style="color: #990000">,</span> <span style="color: #990000">:</span>post<span style="color: #990000">]</span> <span style="color: #FF0000">}</span>
  724
+</tt></pre></div></div>
  725
+<div class="ilist"><ul>
  726
+<li>
  727
+<p>
  728
+Lead Contributor: <a href="http://brennandunn.com/">Brennan Dunn</a>
  729
+</p>
  730
+</li>
  731
+</ul></div>
  732
+<div class="para"><p>Action Controller now offers good support for HTTP conditional GET requests, as well as some other additions.</p></div>
  733
+<h3 id="_other_action_controller_changes">6.3. Other Action Controller Changes</h3>
  734
+<div class="ilist"><ul>
  735
+<li>
  736
+<p>
  737
+You can now easily <a href="http://m.onkey.org/2008/7/20/rescue-from-dispatching">show a custom error page</a> for exceptions raised while routing a request.
  738
+</p>
  739
+</li>
  740
+<li>
  741
+<p>
  742
+The HTTP Accept header is disabled by default now. You should prefer the use of formatted URLs (such as <tt>/customers/1.xml</tt>) to indicate the format that you want. If you need the Accept headers, you can turn them back on with <tt>config.action_controller.user_accept_header = true</tt>.
  743
+</p>
  744
+</li>
  745
+<li>
  746
+<p>
  747
+Benchmarking numbers are now reported in milliseconds rather than tiny fractions of seconds
  748
+</p>
  749
+</li>
  750
+<li>
  751
+<p>
  752
+Rails now supports HTTP-only cookies (and uses them for sessions), which help mitigate some cross-site scripting risks in newer browsers.
  753
+</p>
  754
+</li>
  755
+</ul></div>
  756
+</div>
  757
+<h2 id="_action_view">7. Action View</h2>
  758
+<div class="sectionbody">
  759
+<div class="ilist"><ul>
  760
+<li>
  761
+<p>
  762
+<tt>javascript_include_tag</tt> and <tt>stylesheet_link_tag</tt> support a new <tt>:recursive</tt> option to be used along with <tt>:all</tt>, so that you can load an entire tree of files with a single line of code.
  763
+</p>
  764
+</li>
  765
+<li>
  766
+<p>
  767
+The included Prototype javascript library has been upgraded to version 1.6.0.2.
  768
+</p>
  769
+</li>
  770
+<li>
  771
+<p>
  772
+<tt>RJS#page.reload</tt> to reload the browser's current location via javascript
  773
+</p>
  774
+</li>
  775
+<li>
  776
+<p>
  777
+The <tt>atom_feed</tt> helper now takes an <tt>:instruct</tt> option to let you insert XML processing instructions.
  778
+</p>
  779
+</li>
  780
+</ul></div>
  781
+</div>
  782
+<h2 id="_action_mailer">8. Action Mailer</h2>
  783
+<div class="sectionbody">
  784
+<div class="para"><p>Action Mailer now supports mailer layouts. You can make your HTML emails as pretty as your in-browser views by supplying an appropriately-named layout - for example, the <tt>CustomerMailer</tt> class expects to use <tt>layouts/customer_mailer.html.erb</tt>.</p></div>
  785
+<div class="ilist"><ul>
  786
+<li>
  787
+<p>
  788
+More information:
  789
+</p>
  790
+<div class="ilist"><ul>
  791
+<li>
  792
+<p>
  793
+<a href="http://ryandaigle.com/articles/2008/9/7/what-s-new-in-edge-rails-mailer-layouts">What's New in Edge Rails: Mailer Layouts</a>
  794
+</p>
  795
+</li>
  796
+</ul></div>
  797
+</li>
  798
+</ul></div>
  799
+</div>
  800
+<h2 id="_active_support">9. Active Support</h2>
  801
+<div class="sectionbody">
  802
+<div class="para"><p>Active Support now offers built-in memoization for Rails applications, the <tt>each_with_object</tt> method, prefix support on delegates, and various other new utility methods.</p></div>
  803
+<h3 id="_memoization">9.1. Memoization</h3>
  804
+<div class="para"><p>Memoization is a pattern of initializing a method once and then stashing its value away for repeat use. You've probably used this pattern in your own applications:</p></div>
  805
+<div class="listingblock">
  806
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  807
+by Lorenzo Bettini
  808
+http://www.lorenzobettini.it
  809
+http://www.gnu.org/software/src-highlite -->
  810
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">def</span></span> full_name
  811
+  <span style="color: #009900">@full_name</span> <span style="color: #990000">||=</span> <span style="color: #FF0000">"#{first_name} #{last_name}"</span>
  812
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  813
+</tt></pre></div></div>
  814
+<div class="para"><p>Memoization lets you handle this task in a declarative fashion:</p></div>
  815
+<div class="listingblock">
  816
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  817
+by Lorenzo Bettini
  818
+http://www.lorenzobettini.it
  819
+http://www.gnu.org/software/src-highlite -->
  820
+<pre><tt>extend ActiveSupport<span style="color: #990000">::</span>Memoizable
  821
+
  822
+<span style="font-weight: bold"><span style="color: #0000FF">def</span></span> full_name
  823
+  <span style="color: #FF0000">"#{first_name} #{last_name}"</span>
  824
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  825
+memoize <span style="color: #990000">:</span>full_name
  826
+</tt></pre></div></div>
  827
+<div class="para"><p>Other features of memoization include <tt>unmemoize</tt>, <tt>unmemoize_all</tt>, and <tt>memoize_all</tt> to turn memoization on or off.</p></div>
  828
+<div class="ilist"><ul>
  829
+<li>
  830
+<p>
  831
+Lead Contributor: <a href="http://joshpeek.com/">Josh Peek</a>
  832
+</p>
  833
+</li>
  834
+<li>
  835
+<p>
  836
+More information:
  837
+</p>
  838
+<div class="ilist"><ul>
  839
+<li>
  840
+<p>
  841
+<a href="http://ryandaigle.com/articles/2008/7/16/what-s-new-in-edge-rails-memoization">What's New in Edge Rails: Easy Memoization</a>
  842
+</p>
  843
+</li>
  844
+<li>
  845
+<p>
  846
+<a href="http://www.railway.at/articles/2008/09/20/a-guide-to-memoization">Memo-what? A Guide to Memoization</a>
  847
+</p>
  848
+</li>
  849
+</ul></div>
  850
+</li>
  851
+</ul></div>
  852
+<h3 id="_tt_each_with_object_tt">9.2. <tt>each_with_object</tt></h3>
  853
+<div class="para"><p>The <tt>each_with_object</tt> method provides an alternative to <tt>inject</tt>, using a method backported from Ruby 1.9. It iterates over a collection, passing the current element and the memo into the block.</p></div>
  854
+<div class="listingblock">
  855
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  856
+by Lorenzo Bettini
  857
+http://www.lorenzobettini.it
  858
+http://www.gnu.org/software/src-highlite -->
  859
+<pre><tt><span style="color: #990000">%</span>w<span style="color: #990000">(</span>foo bar<span style="color: #990000">).</span>each_with_object<span style="color: #990000">(</span><span style="color: #FF0000">{}</span><span style="color: #990000">)</span> <span style="color: #FF0000">{</span> <span style="color: #990000">|</span>str<span style="color: #990000">,</span> hsh<span style="color: #990000">|</span> hsh<span style="color: #990000">[</span>str<span style="color: #990000">]</span> <span style="color: #990000">=</span> str<span style="color: #990000">.</span>upcase <span style="color: #FF0000">}</span> <span style="font-style: italic"><span style="color: #9A1900">#=&gt; {'foo' =&gt; 'FOO', 'bar' =&gt; 'BAR'}</span></span>
  860
+</tt></pre></div></div>
  861
+<div class="para"><p>Lead Contributor: <a href="http://therealadam.com/">Adam Keys</a></p></div>
  862
+<h3 id="_delegates_with_prefixes">9.3. Delegates With Prefixes</h3>
  863
+<div class="para"><p>If you delegate behavior from one class to another, you can now specify a prefix that will be used to identify the delegated methods. For example:</p></div>
  864
+<div class="listingblock">
  865
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  866
+by Lorenzo Bettini
  867
+http://www.lorenzobettini.it
  868
+http://www.gnu.org/software/src-highlite -->
  869
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> Vendor <span style="color: #990000">&lt;&lt;</span> ActiveRecord<span style="color: #990000">::</span>Base
  870
+  has_one <span style="color: #990000">:</span>account
  871
+  delegate <span style="color: #990000">:</span>email<span style="color: #990000">,</span> <span style="color: #990000">:</span>password<span style="color: #990000">,</span> <span style="color: #990000">:</span>to <span style="color: #990000">=&gt;</span> <span style="color: #990000">:</span>account<span style="color: #990000">,</span> <span style="color: #990000">:</span>prefix <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #0000FF">true</span></span>
  872
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  873
+</tt></pre></div></div>
  874
+<div class="para"><p>This will produce delegated methods <tt>vendor.account_email</tt> and <tt>vendor.account_password</tt>. You can also specify a custom prefix:</p></div>
  875
+<div class="listingblock">
  876
+<div class="content"><!-- Generator: GNU source-highlight 2.9
  877
+by Lorenzo Bettini
  878
+http://www.lorenzobettini.it
  879
+http://www.gnu.org/software/src-highlite -->
  880
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">class</span></span> Vendor <span style="color: #990000">&lt;&lt;</span> ActiveRecord<span style="color: #990000">::</span>Base
  881
+  has_one <span style="color: #990000">:</span>account
  882
+  delegate <span style="color: #990000">:</span>email<span style="color: #990000">,</span> <span style="color: #990000">:</span>password<span style="color: #990000">,</span> <span style="color: #990000">:</span>to <span style="color: #990000">=&gt;</span> <span style="color: #990000">:</span>account<span style="color: #990000">,</span> <span style="color: #990000">:</span>prefix <span style="color: #990000">=&gt;</span> <span style="color: #990000">:</span>owner
  883
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
  884
+</tt></pre></div></div>
  885
+<div class="para"><p>This will produce delegated methods <tt>vendor.owner_email</tt> and <tt>vendor.owner_password</tt>.</p></div>
  886
+<div class="para"><p>Lead Contributor: <a href="http://workingwithrails.com/person/5830-daniel-schierbeck">Daniel Schierbeck</a></p></div>
  887
+<h3 id="_other_active_support_changes">9.4. Other Active Support Changes</h3>
  888
+<div class="ilist"><ul>
  889
+<li>
  890
+<p>
  891
+Extensive updates to <tt>ActiveSupport::Multibyte</tt>, including Ruby 1.9 compatibility fixes.
  892
+</p>
  893
+</li>
  894
+<li>
  895
+<p>
  896
+The addition of <tt>ActiveSupport::Rescuable</tt> allows any class to mix in the <tt>rescue_from</tt> syntax.
  897
+</p>
  898
+</li>
  899
+<li>
  900
+<p>
  901
+<tt>past?</tt>, <tt>today?</tt> and <tt>future?</tt> for <tt>Date</tt> and <tt>Time</tt> classes to facilitate date/time comparisons.
  902
+</p>
  903
+</li>
  904
+<li>
  905
+<p>
  906
+<tt>Array#second</tt> through <tt>Array#tenth</tt> as aliases for <tt>Array#[1]</tt> through <tt>Array#[9]</tt>
  907
+</p>
  908
+</li>
  909
+<li>
  910
+<p>
  911
+<tt>Enumerable#several?</tt> to encapsulate <tt>collection.size &gt; 1</tt>
  912
+</p>
  913
+</li>
  914
+<li>
  915
+<p>
  916
+<tt>Inflector#parameterize</tt> produces a URL-ready version of its input, for use in <tt>to_param</tt>.
  917
+</p>
  918
+</li>
  919
+<li>
  920
+<p>
  921
+<tt>Time#advance</tt> recognizes fractional days and weeks, so you can do <tt>1.7.weeks.ago</tt>, <tt>1.5.hours.since</tt>, and so on.
  922
+</p>
  923
+</li>
  924
+<li>
  925
+<p>
  926
+The included TzInfo library has been upgraded to version 0.3.11.
  927
+</p>
  928
+</li>
  929
+</ul></div>
  930
+</div>
  931
+<h2 id="_railties">10. Railties</h2>
  932
+<div class="sectionbody">
  933
+<div class="para"><p>In Railties (the core code of Rails itself) the biggest changes are in the <tt>config.gems</tt> mechanism.</p></div>
  934
+<h3 id="_tt_config_gems_tt">10.1. <tt>config.gems</tt></h3>
  935
+<div class="para"><p>To avoid deployment issues and make Rails applications more self-contained, it's possible to place copies of all of the gems that your Rails application requires in <tt>/vendor/gems</tt>. This capability first appeared in Rails 2.1, but it's much more flexible and robust in Rails 2.2, handling complicated dependencies between gems. Gem management in Rails includes these commands:</p></div>
  936
+<div class="ilist"><ul>
  937
+<li>
  938
+<p>
  939
+<tt>config.gem <em>gem_name</em></tt> in your <tt>config/environment.rb</tt> file
  940
+</p>
  941
+</li>
  942
+<li>
  943
+<p>
  944
+<tt>rake gems</tt> to list all configured gems, as well as whether they (and their dependencies) are installed or frozen
  945
+</p>
  946
+</li>
  947
+<li>
  948
+<p>
  949
+<tt>rake gems:install</tt> to install missing gems to the computer
  950
+</p>
  951
+</li>
  952
+<li>
  953
+<p>
  954
+<tt>rake gems:unpack</tt> to place a copy of the required gems into <tt>/vendor/gems</tt>
  955
+</p>
  956
+</li>
  957
+<li>
  958
+<p>
  959
+<tt>rake gems:unpack:dependencies</tt> to get copies of the required gems and their dependencies into <tt>/vendor/gems</tt>
  960
+</p>
  961
+</li>
  962
+<li>
  963
+<p>
  964
+<tt>rake gems:build</tt> to build any missing native extensions
  965
+</p>
  966
+</li>
  967
+<li>
  968
+<p>
  969
+<tt>rake gems:refresh_specs</tt> to bring vendored gems created with Rails 2.1 into alignment with the Rails 2.2 way of storing them
  970
+</p>
  971
+</li>
  972
+</ul></div>
  973
+<div class="para"><p>You can unpack or install a single gem by specifying <tt>GEM=_gem_name</tt> on the command line.</p></div>
  974
+<div class="ilist"><ul>
  975
+<li>
  976
+<p>
  977
+Lead Contributor: <a href="http://github.com/al2o3cr">Matt Jones</a>
  978
+</p>
  979
+</li>
  980
+<li>
  981
+<p>
  982
+More information:
  983
+</p>
  984
+<div class="ilist"><ul>
  985
+<li>
  986
+<p>
  987
+<a href="http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies">What's New in Edge Rails: Gem Dependencies</a>
  988
+</p>
  989
+</li>
  990
+</ul></div>
  991
+</li>
  992
+</ul></div>
  993
+<h3 id="_other_railties_changes">10.2. Other Railties Changes</h3>
  994
+<div class="ilist"><ul>
  995
+<li>
  996
+<p>
  997
+If you're a fan of the <a href="http://code.macournoyer.com/thin/">Thin</a> web server, you'll be happy to know that <tt>script/server</tt> now supports Thin directly.
  998
+</p>
  999
+</li>
  1000
+<li>
  1001
+<p>
  1002
+<tt>script/plugin install &lt;plugin&gt; -r &lt;revision&gt;</tt> now works with git-based as well as svn-based plugins.
  1003
+</p>
  1004
+</li>
  1005
+<li>
  1006
+<p>
  1007
+<tt>script/console</tt> now supports a <tt>&#8212;debugger</tt> option
  1008
+</p>
  1009
+</li>
  1010
+<li>
  1011
+<p>
  1012
+Instructions for setting up a continuous integration server to build Rails itself are included in the Rails source
  1013
+</p>
  1014
+</li>
  1015
+<li>
  1016
+<p>
  1017
+<tt>rake notes:custom ANNOTATION=MYFLAG</tt> lets you list out custom annotations.
  1018
+</p>
  1019
+</li>
  1020
+<li>
  1021
+<p>
  1022
+Wrapped <tt>Rails.env</tt> in <tt>StringQuestioneer</tt> so you can do <tt>Rails.env.development?</tt>
  1023
+</p>
  1024
+</li>
  1025
+<li>
  1026
+<p>
  1027
+<tt>script/generate</tt> works without deprecation warnings when RubyGems 1.3.0 is present
  1028
+</p>
  1029
+</li>
  1030
+</ul></div>
  1031
+</div>
  1032
+<h2 id="_deprecated">11. Deprecated</h2>
  1033
+<div class="sectionbody">
  1034
+<div class="para"><p>A few pieces of older code are deprecated in this release:</p></div>
  1035
+<div class="ilist"><ul>
  1036
+<li>
  1037
+<p>
  1038
+<tt>Rails::SecretKeyGenerator</tt> has been replaced by <tt>ActiveSupport::SecureRandom</tt>
  1039
+</p>
  1040
+</li>
  1041
+<li>
  1042
+<p>
  1043
+<tt>render_component</tt> is deprecated. There's a <a href="http://github.com/rails/render_component/tree/master">render_components plugin</a> available if you need this functionality.
  1044
+</p>
  1045
+</li>
  1046
+<li>
  1047
+<p>
  1048
+<tt>country_select</tt> has been removed. See the <a href="http://www.rubyonrails.org/deprecation/list-of-countries">deprecation page</a> for more information and a plugin replacement.
  1049
+</p>
  1050
+</li>
  1051
+<li>
  1052
+<p>
  1053
+<tt>ActiveRecord::Base.allow_concurrency</tt> no longer has any effect.
  1054
+</p>
  1055
+</li>
  1056
+<li>
  1057
+<p>
  1058
+<tt>ActiveRecord::Errors.default_error_messages</tt> has been deprecated in favor of <tt>I18n.translate(<em>activerecord.errors.messages</em>)</tt>
  1059
+</p>
  1060
+</li>
  1061
+<li>
  1062
+<p>
  1063
+The <tt>%s</tt> and <tt>%d</tt> interpolation syntax for internationalization is deprecated.
  1064
+</p>
  1065
+</li>
  1066
+<li>
  1067
+<p>
  1068
+<tt>String#chars</tt> has been deprecated in favor of <tt>String#mb_chars</tt>.
  1069
+</p>
  1070
+</li>
  1071
+<li>
  1072
+<p>