Latest in branch 2.3
2.3.18
Released 18 Mar 2013
(13 years ago)
SoftwareRuby on Rails
Version2.3
Status
End of life
Initial release2.3.0
02 Feb 2009
(17 years ago)
Latest release2.3.18
18 Mar 2013
(13 years ago)
End of bug fixesUnavailable
End of security fixesUnavailable
Release noteshttps://github.com/rails/rails/releases/tag/v2.3.18
Source codehttps://github.com/rails/rails/tree/v2.3.18
Downloadhttps://github.com/rails/rails/releases/tag/v2.3.18
Ruby on Rails 2.3 ReleasesView full list

What Is New in Ruby on Rails 2.3

Category Highlights
New Features Full Rack integration, revived Rails Engines, nested attributes & transactions, dynamic & default scopes, batch find methods, HTTP Digest authentication, unified render API, localized view templates.
Improvements Middleware stack inspection (rake middleware), lazy-loaded sessions, 8% faster respond_to, per-request cache for remote stores, MIME::Type =~ operator, partial translation scoping.
Bug Fixes Removed stray AS in HABTM preload, new_record? returns false, fixed table-name quoting in has_many :through, updated_at can be set manually, clearer find_by! errors, to_xml camelize option, callback cancellation fix, JDBC test tasks, validates_length_of custom messages, scoped count works, invalid? now mirrors valid?.
Breaking Changes CGI layer removed (CgiRequest/Response gone), session stores renamed to ActionController::Session::*, config.session key renamed to :key and :session_domain to :domain, formatted_ route helpers deprecated, application.rb renamed to application_controller.rb, ActionController::Request now inherits from Rack::Request, middleware now handles request locking, ParamsParser added for JSON/XML/YAML.
Deprecations Formatted_ route helpers, old CGI session classes, legacy render syntax requiring explicit :file/:template/:action options.

How does the Rack integration in Rails 2.3 affect my existing application?

Rails 2.3 runs the entire stack on Rack, which means every request passes through a configurable middleware chain before reaching your controllers.

In practice this gives you three immediate benefits:

  • You can swap the built-in WEBrick server for any Rack-compatible server (Thin, Puma, Unicorn) simply by running script/server with a config.ru file.
  • The new rake middleware task lets you inspect ordering, add custom middleware, or remove the default ActionController::Lock if you manage concurrency elsewhere.
  • Session handling is now lazy-loaded and lives in Rack, so sessions are only touched when you actually read or write session in your controller.

Watch out for code that directly accessed CgiRequest or relied on CGI-specific environment variables - those classes have been removed.

# Example: inserting a custom middleware
# config/initializers/custom_middleware.rb
Rails.application.config.middleware.insert_before ActionDispatch::Static, "MyAuthMiddleware"

What are the most important Active Record enhancements in Rails 2.3?

Rails 2.3 adds nested attributes, nested transactions, dynamic/default scopes, and batch find methods to make complex data workflows easier.

  • Nested attributes let you save a parent and its children in one call: accepts_nested_attributes_for :author, :pages.
  • Nested transactions use savepoints so you can roll back an inner block without aborting the outer one, e.g. User.transaction { ... User.transaction(:requires_new => true) { ... raise ActiveRecord::Rollback } }.
  • Dynamic scopes generate methods on the fly (Order.scoped_by_customer_id(12)) and default_scope applies a base ordering to every query.
  • Batch processing with find_in_batches and find_each reduces memory pressure when iterating over thousands of rows.

This matters if your app imports large CSV files or needs atomic updates across several associated models.

How have rendering and routing changed in Rails 2.3?

Rails 2.3 simplifies rendering by inferring the type of template from the string you pass to render, and it streamlines routing by dropping the old formatted_ helpers.

Examples:

# Old style
render :template => 'posts/show'
# New style
render 'posts/show'

Routing now accepts :format as a regular option, cutting route-generation time by roughly 50% and saving up to 100 MB of memory in large apps. You can also split routes across multiple files with RouteSet#add_configuration_file, which is handy for engines.

What should I know about session handling and middleware in Rails 2.3?

Sessions are now lazy-loaded and live in the Rack layer, meaning they are only instantiated when you reference session in a controller.

  • Switching the session store is still done via ActionController::Base.session_store = :active_record_store, but the underlying classes have been renamed (e.g., ActionController::Session::CookieStore).
  • The mutex that once wrapped the whole request is now the ActionController::Lock middleware, giving you finer control over concurrency.
  • Use rake middleware to verify that ActionDispatch::Session::CookieStore (or your chosen store) appears in the stack.

Most teams will see no functional change, but if you previously disabled sessions globally you can now simply avoid touching session and the overhead disappears.

Frequently Asked Questions

Do I need to change my existing routes after upgrading to Rails 2.3?
Most routes will continue to work, but you should replace any formatted_ helpers with the standard :format option for better performance.

Can I still use CGI with Rails 2.3?
Yes, Rails provides a CGIHandler wrapper that proxies CGI requests through Rack.

How do I list the current middleware stack?
Run rake middleware in the application root to see the ordered list of middleware components.

Is the new default_scope applied to all find calls?
Yes, default_scope adds its conditions to every query unless you explicitly override it with unscoped.

What is the syntax for enabling nested attributes on a model?
In the model file add accepts_nested_attributes_for followed by the association name, for example accepts_nested_attributes_for :author.

Will my existing session cookies break after the rename of session classes?
No, the cookie format stays the same; only the internal class names have changed.

Releases In Branch 2.3

VersionRelease date
2.3.1818 Mar 2013
(13 years ago)
2.3.1710 Feb 2013
(13 years ago)
2.3.1628 Jan 2013
(13 years ago)
2.3.1508 Jan 2013
(13 years ago)
2.3.1416 Aug 2011
(14 years ago)
2.3.1316 Aug 2011
(14 years ago)
2.3.1207 Jun 2011
(14 years ago)
2.3.1109 Feb 2011
(15 years ago)
2.3.1015 Oct 2010
(15 years ago)
2.3.904 Sep 2010
(15 years ago)
2.3.9.pre29 Aug 2010
(15 years ago)
2.3.824 May 2010
(16 years ago)
2.3.724 May 2010
(16 years ago)
2.3.622 May 2010
(16 years ago)
2.3.527 Nov 2009
(16 years ago)
2.3.404 Sep 2009
(16 years ago)
2.3.3.119 Jul 2009
(16 years ago)
2.3.316 Jul 2009
(16 years ago)
2.3.2.117 Mar 2009
(17 years ago)
2.3.215 Mar 2009
(17 years ago)
2.3.105 Mar 2009
(17 years ago)
2.3.002 Feb 2009
(17 years ago)