Skip to content
Browse files

First draft of Rails 2.3 release notes.

  • Loading branch information...
1 parent f7a6bc8 commit 4290b3cba0fee69f7f87bb095d4104cdfd49a08e @ffmike ffmike committed Jan 27, 2009
Showing with 399 additions and 0 deletions.
  1. +399 −0 railties/doc/guides/source/2_3_release_notes.txt
View
399 railties/doc/guides/source/2_3_release_notes.txt
@@ -0,0 +1,399 @@
+Ruby on Rails 2.3 Release Notes
+===============================
+
+Rails 2.3 delivers a variety of new and improved features, including pervasive Rack integration, refreshed support for Rails Engines, nested transactions for Active Record, dynamic and default scopes, unified rendering, more efficient routing, application templates, and quiet backtraces. 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 link:http://github.com/rails/rails/commits/master[list of commits] in the main Rails repository on GitHub.
+
+== Application Architecture
+
+There are two major changes in the architecture of Rails applications: complete integration of the link:http://rack.rubyforge.org/[Rack] modular web server interface, and renewed support for Rails Engines.
+
+=== Rack Integration
+
+Rails has now broken with its CGI past, and uses Rack everywhere. This required and resulted in a tremendous number of internal changes (but if you use CGI, don't worry; Rails now supports CGI through a proxy interface.) Still, this is a major change to Rails internals. After upgrading to 2.3, you should test on your local environment and your production environment. Some things to test:
+
+* Sessions
+* Cookies
+* File uploads
+* JSON/XML APIs
+
+Here's a summary of the rack-related changes:
+
+* +script/server+ has been switched to use Rack, which means it supports any Rack compatible server. +script/server+ will also pick up a rackup configuration file if one exists. By default, it will look for a +config.ru+ file, but you can override this with the +-c+ switch.
+* The FCGI handler goes through Rack
+* ActionController::Dispatcher maintains its own default middleware stack. Middlewares can be injected in, reordered, and removed. The stack is compiled into a chain on boot. You can configure the middleware stack in +environment.rb+
+* The +rake middleware+ task has been added to inspect the middleware stack. This is useful for debugging the order of the middleware stack.
+* The integration test runner has been modified to execute the entire middleware and application stack. This makes integration tests perfect for testing Rack middleware.
+* +ActionController::CGIHandler+ is a backwards compatible CGI wrapper around Rack. The +CGIHandler+ is meant to take an old CGI object and converts its environment information into a Rack compatible form.
+* +CgiRequest+ and +CgiResponse+ have been removed
+* Session stores are now lazy loaded. If you never access the session object during a request, it will never attempt to load the session data (parse the cookie, load the data from memcache, or lookup an Active Record object).
+* +CGI::Session::CookieStore+ has been replaced by +ActionController::Session::CookieStore+
+* +CGI::Session::MemCacheStore+ has been replaced by +ActionController::Session::MemCacheStore+
+* +CGI::Session::ActiveRecordStore+ has been replaced by +ActiveRecord::SessionStore+
+* You can still change you session store with +ActionController::Base.session_store = :active_record_store+
+* Default sessions options are still set with +ActionController::Base.session = { :key => "..." }+
+* The mutex that normally wraps your entire request has been moved into middleware, +ActionController::Lock+
+* +ActionController::AbstractRequest+ and +ActionController::Request+ have been unified. The new +ActionController::Request+ inherits from +Rack::Request+. This affects access to +response.headers['type']+ in test requests. Use +response.content_type+ instead.
+* +ActiveRecord::QueryCache+ middleware is automatically inserted onto the middleware stack if +ActiveRecord+ has been loaded. This middleware sets up and flushes the per-request Active Record query cache.
+* The Rails router and controller classes follow the Rack spec. You can call a controller directly with +SomeController.call(env)+. The router stores the routing parameters in +rack.routing_args+.
+* +ActionController::Request+ inherits from +Rack::Request+
+* Instead of +config.action_controller.session = { :session_key => 'foo', ...+ use +config.action_controller.session = { :key => 'foo', ...+
+* Using the +ParamsParser+ middleware preprocesses any XML, JSON, or YAML requests so they can be read normally with any +Rack::Request+ object after it.
+
+=== Renewed Support for Rails Engines
+
+After some versions without an upgrade, Rails 2.3 offers some new features for Rails Engines (Rails applications that can be embedded within other applications). First, routing files in engines are automatically loaded and reloaded now, just like your +routes.rb+ file (this also applies to routing files in other plugins). Second, if your plugin has an app folder, then app/[models|controllers|helpers] will automatically be added to the Rails load path. Engines also support adding view paths now.
+
+* Lead Contributor: link:http://www.loudthinking.com/[David Heinemeier Hansson]
+
+== Documentation
+
+The link:http://guides.rubyonrails.org/[Ruby on Rails guides] project has published several additional guides for Rails 2.3. In addition, a link:http://guides.rails.info/[separate site] maintains updated copies of the Guides for Edge Rails. Other documentation efforts include a relaunch of the link:http://newwiki.rubyonrails.org/[Rails wiki] and early planning for a Rails Book.
+
+* More Information: link:http://weblog.rubyonrails.org/2009/1/15/rails-documentation-projects[Rails Documentation Projects]
+
+== Active Record
+
+Active Record gets quite a number of new features and bug fixes in Rails 2.3. The highlights include nested transactions, dynamic scopes, and default scopes.
+
+=== Nested Transactions
+
+Active Record now supports nested transactions, a much-requested feature. Now you can write code like this:
+
+[source, ruby]
+-------------------------------------------------------
+User.transaction do
+ User.create(:username => 'Admin')
+ User.transaction(:requires_new => true) do
+ User.create(:username => 'Regular')
+ raise ActiveRecord::Rollback
+ end
+ end
+
+ User.find(:all) # => Returns only Admin
+-------------------------------------------------------
+
+Nested transactions let you roll back an inner transaction without affecting the state of the outer transaction. If you want a transaction to be nested, you must explicitly add the +:requires_new+ option; otherwise, a nested transaction simply becomes part of the parent transaction (as it does currently on Rails 2.2). Under the covers, nested transactions are link:http://rails.lighthouseapp.com/projects/8994/tickets/383[using savepoints], so they're supported even on databases that don't have true nested transactions. There is also a bit of magic going on to make these transactions play well with transactional fixtures during testing.
+
+* Lead Contributors: link:http://www.workingwithrails.com/person/4985-jonathan-viney[Jonathan Viney] and link:http://izumi.plan99.net/blog/[Hongli Lai]
+
+=== Dynamic Scopes
+
+You know about dynamic finders in Rails (which allow you to concoct methods like +find_by_color_and_flavor+ on the fly) and named scopes (which allow you to encapsulate reusable query conditions into friendly names like +currently_active+). Well, now you can have dynamic scope methods. The idea is to put together syntax that allows filtering on the fly <i>and</i> method chaining. For example:
+
+[source, ruby]
+-------------------------------------------------------
+Order.scoped_by_customer_id(12)
+Order.scoped_by_customer_id(12).find(:all,
+ :conditions => "status = 'open'")
+Order.scoped_by_customer_id(12).scoped_by_status("open")
+-------------------------------------------------------
+
+There's nothing to define to use dynamic scopes: they just work.
+
+* Lead Contributor: link:http://evilmartians.com/[Yaroslav Markin]
+* More Information: link:http://ryandaigle.com/articles/2008/12/29/what-s-new-in-edge-rails-dynamic-scope-methods[What's New in Edge Rails: Dynamic Scope Methods].
+
+=== Default Scopes
+
+Rails 2.3 will introduce the notion of _default scopes_ similar to named scopes, but applying to all named scopes or find methods within the model. For example, you can write +default_scope :order => 'name ASC'+ and any time you retrieve records from that model they'll come out sorted by name (unless you override the option, of course).
+
+* Lead Contributor: Paweł Kondzior
+* More Information: link:http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-default-scoping[What's New in Edge Rails: Default Scoping]
+
+=== Multiple Conditions for Callbacks
+
+When using Active Record callbacks, you can now combine +:if+ and +:unless+ options on the same callback, and supply multiple conditions as an array:
+
+[source, ruby]
+-------------------------------------------------------
+before_save :update_credit_rating, :if => :active,
+ :unless => [:admin, :cash_only]
+-------------------------------------------------------
+* Lead Contributor: L. Caviola
+
+=== Find with having
+
+Rails now has a +:having+ option on find (as well as on +has_many+ and +has_and_belongs_to_many+ associations) for filtering records in grouped finds. As those with heavy SQL backgrounds know, this allows filtering based on grouped results:
+
+[source, ruby]
+-------------------------------------------------------
+developers = Developer.find(:all, :group => "salary",
+ :having => "sum(salary) > 10000", :select => "salary")
+-------------------------------------------------------
+
+* Lead Contributor: link:http://github.com/miloops[Emilio Tagua]
+
+=== Hash Conditions for +has_many+ relationships
+
+You can once again use a hash in conditions for a +has_many+ relationship:
+
+[source, ruby]
+-------------------------------------------------------
+has_many :orders, :conditions => {:status => 'confirmed'}
+-------------------------------------------------------
+
+That worked in Rails 2.1, fails in Rails 2.2, and will now work again in Rails 2.3 (if you're dealing with this issue in Rails 2.2, you can use a string rather than a hash to specify conditions).
+
+* Lead Contributor: link:http://www.spacevatican.org/[Frederick Cheung]
+
+=== Other Active Record Changes
+
+* An extra +AS+ was removed from the code for has_and_belongs_to_many preloading, making it work better for some databases.
+* +ActiveRecord::Base#new_record?+ now returns false rather than nil when confronted with an existing record.
+* A bug in quoting table names in some +has_many :through+ associations was fixed.
+* You can now specify a particular timestamp for +updated_at+ timestamps: +cust = Customer.create(:name => "ABC Industries", :updated_at => 1.day.ago)+
+* Better error messages on failed +find_by_attribute!+ calls.
+* Active Record's +to_xml+ support gets just a little bit more flexible with the addition of a +:camelize+ option.
+* A bug in canceling callbacks from +before_update+ or +before_create_ was fixed.
+
+== Action Controller
+
+Action Controller rolls out some significant changes to rendering, as well as improvements in routing and other areas, in this release.
+
+=== Unified Rendering
+
++ActionController::Base#render+ is a lot smarter about deciding what to render. Now you can just tell it what to render and expect to get the right results. In older versions of Rails, you often need to supply explicit information to render:
+
+[source, ruby]
+-------------------------------------------------------
+render :file => '/tmp/random_file.erb'
+render :template => 'other_controller/action'
+render :action => 'show'
+-------------------------------------------------------
+
+Now in Rails 2.3, you can just supply what you want to render:
+
+[source, ruby]
+-------------------------------------------------------
+render '/tmp/random_file.erb'
+render 'other_controller/action'
+render 'show'
+render :show
+-------------------------------------------------------
+Rails chooses between file, template, and action depending on whether there is a leading slash, an embedded slash, or no slash at all in what's to be rendered. Note that you can also use a symbol instead of a string when rendering an action. Other rendering styles (+:inline, :text, :update, :nothing, :json, :xml, :js+) still require an explicit option.
+
+* Lead Contributor: link:http://m.onkey.org/[Pratik Naik]
+
+=== Application Controller Renamed
+
+If you're one of the people who has always been bothered by the special-case naming of +application.rb+, rejoice! It's been reworked to be application_controller.rb in Rails 2.3. In addition, there's a new rake task, +rake rails:update:application_controller+ to do this automatically for you - and it will be run as part of the normal +rake rails:update+ process.
+
+* Lead Contributor: link:http://www.loudthinking.com/[David Heinemeier Hansson]
+* More Information:
+ - link:http://afreshcup.com/2008/11/17/rails-2x-the-death-of-applicationrb/[The Death of Application.rb]
+ - link:http://ryandaigle.com/articles/2008/11/19/what-s-new-in-edge-rails-application-rb-duality-is-no-more[What's New in Edge Rails: Application.rb Duality is no More]
+
+=== More Efficient Routing
+
+There are a couple of significant routing changes in Rails 2.3. The +formatted_+ route helpers are gone, in favor just passing in +:format+ as an option. This cuts down the route generation process by 50% for any resource - and can save a substantial amount of memory (up to 100MB on large applications). If your code uses the +formatted_+ helpers, it will still work for the time being - but that behavior is deprecated and your application will be more efficient if you rewrite those routes using the new standard. Another big change is that Rails now supports multiple routing files, not just routes.rb. You can use +RouteSet#add_configuration_file+ to bring in more routes at any time - without clearing the currently-loaded routes. While this change is most useful for Engines, you can use it in any application that needs to load routes in batches.
+
+Lead Contributors: link:http://blog.hungrymachine.com/[Aaron Batalion] and link:http://www.loudthinking.com/[David Heinemeier Hansson]
+
+=== Rack-based Lazy-loaded Sessions
+
+A big change pushed the underpinnings of Action Controller session storage down to the Rack level. This involved a good deal of work in the code, though it should be completely transparent to your Rails applications (as a bonus, some icky patches around the old CGI session handler got removed). It's still significant, though, for one simple reason: non-Rails Rack applications have access to the same session storage handlers (and therefore the same session) as your Rails applications. In addition, sessions are now lazy-loaded (in line with the loading improvements to the rest of the framework). This means that you no longer need to explicitly disable sessions if you don't want them; just don't refer to them and they won't load.
+
+* Lead Contributor: link:http://joshpeek.com/[Josh Peek]
+
+=== MIME Type Handling Changes
+
+There are a couple of changes to the code for handling MIME types in Rails. First, +MIME::Type+ now implements the +=~+ operator, making things much cleaner when you need to check for the presence of a type that has synonyms:
+
+[source, ruby]
+-------------------------------------------------------
+if content_type && Mime::JS =~ content_type
+ # do something cool
+end
+
+Mime::JS =~ "text/javascript" => true
+Mime::JS =~ "application/javascript" => true
+-------------------------------------------------------
+
+The other change is that the framework now uses the +Mime::JS+ when checking for javascript in various spots, making it handle those alternatives cleanly.
+
+Lead Contributor: link:http://www.workingwithrails.com/person/5510-seth-fitzsimmons[Seth Fitzsimmons]
+
+=== Optimization of +respond_to+
+
+In some of the first fruits of the Rails-Merb team merger, Rails 2.3 includes some optimizations for the +respond_to+ method, which is of course heavily used in many Rails applications to allow your controller to format results differently based on the MIME type of the incoming request. After eliminating a call to +method_missing+ and some profiling and tweaking, we're seeing an 8% improvement in the number of requests per second served with a simple +respond_to+ that switches between three formats. The best part? No change at all required to the code of your application to take advantage of this speedup.
+
+* Lead Contributor: link:http://yehudakatz.com/[Yehuda Katz]
+
+=== Improved Caching Performance
+
+Rails now keeps a per-request local cache of requests, cutting down on unnecessary reads and leading to better site performance. While this work was originally limited to +MemCacheStore+, it is available to any remote store than implements the required methods.
+
+* Lead Contributor: link:http://www.motionstandingstill.com/[Nahum Wild]
+
+=== Other Action Controller Changes
+
+* ETag handling has been cleaned up a bit: Rails will now skip sending an ETag header when there's no body to the response or when sending files with +send_file+.
+* The fact that Rails checks for IP spoofing can be a nuisance for sites that do heavy traffic with cell phones, because their proxies don't generally set things up right. If that's you, you can now set +ActionController::Base.ip_spoofing_check = false+ to disable the check entirely.
+* ActionController::Dispatcher now implements its own middleware stack, which you can see by running +rake middleware+.
+* Cookie sessions now have persistent session identifiers, with API compatibility with the server-side stores.
+* You can now use symbols for the +:type+ option of +send_file+ and +send_data+, like this: +send_file("fabulous.png", :type => :png)+.
+
+== Action View
+
+Action View in Rails 2.3 picks up improvements to +render+, more flexible prompts for the date select helpers, and a speedup in asset caching, among other things.
+
+=== Smart Rendering
+
+The render method has been getting smarter over the years, and it's even smarter now. If you have an object or a collection and an appropriate partial, and the naming matches up, you can now just render the object and things will work. For example, in Rails 2.3, these render calls will work in your view (assuming sensible naming):
+
+[source, ruby]
+-------------------------------------------------------
+<% render @article %>
+<% render @articles %>
+-------------------------------------------------------
+
+* Lead Contributor: link:http://www.loudthinking.com/[David Heinemeier Hansson]
+* More Information: link:http://ryandaigle.com/articles/2008/11/20/what-s-new-in-edge-rails-render-stops-being-high-maintenance[What's New in Edge Rails: render Stops Being High-Maintenance]
+
+=== Prompts for Date Select Helpers
+
+In Rails 2.3, you can supply custom prompts for the various date select helpers (+date_select+, +time_select+, and +datetime_select+), the same way you can with collection select helpers. You can supply a prompt string or a hash of individual prompt strings for the various components. You can also just set +:prompt+ to +true+ to use the custom generic prompt:
+
+[source, ruby]
+-------------------------------------------------------
+select_datetime(DateTime.now, :prompt => true)
+
+select_datetime(DateTime.now, :prompt => "Choose date and time")
+
+select_datetime(DateTime.now, :prompt =>
+ {:day => 'Choose day', :month => 'Choose month',
+ :year => 'Choose year', :hour => 'Choose hour',
+ :minute => 'Choose minute'})
+-------------------------------------------------------
+
+Lead Contributor: link:http://samoliver.com/[Sam Oliver]
+
+=== AssetTag Timestamp Caching
+
+You're likely familiar with Rails' practice of adding timestamps to static asset paths as a "cache buster." This helps ensure that stale copies of things like images and stylesheets don't get served out of the user's browser cache when you change them on the server. You can now modify this behavior with the +cache_asset_timestamps+ configuration option for Action View. If you enable the cache, then Rails will calculate the timestamp once when it first serves an asset, and save that value. This means fewer (expensive) file system calls to serve static assets - but it also means that you can't modify any of the assets while the server is running and expect the changes to get picked up by clients.
+
+* Lead Contributor: link:http://joshpeek.com/[Josh Peek]
+
+=== Asset Hosts as Objects
+
+Asset hosts get more flexible in edge Rails with the ability to declare an asset host as a specific object that responds to a call. This allows you to to implement any complex logic you need in your asset hosting.
+
+* Lead Contributor: link:http://www.loudthinking.com/[David Heinemeier Hansson]
+* More Information: link:http://github.com/dhh/asset-hosting-with-minimum-ssl/tree/master[asset-hosting-with-minimum-ssl]
+
+=== Other Action View Changes
+
+* Token generation for CSRF protection has been simplified; now Rails uses a simple random string generated by +ActiveSupport::SecureRandom+ rather than mucking around with session IDs.
+* +auto_link+ now properly applies options (such as :target and :class) to generated e-mail links.
+* The +autolink+ helper has been refactored to make it a bit less messy and more intuitive.
+
+== Active Support
+
+Active Support has a few interesting changes, including the introduction of +Object#try+.
+
+=== Object#try
+
+A lot of folks have adopted the notion of using try() to attempt operations on objects - It's especially helpful in views where you can avoid nil-checking by writing code like +<%= @person.try(:name) %>+. Well, now it's baked right into Rails. As implemented in Rails, it raises +NoMethodError+ on private methods and always returns +nil+ if the object is nil.
+
+* Lead Contributor: link:http://m.onkey.org/[Pratik Naik]
+* More Information: link:http://ozmm.org/posts/try.html[try()].
+
+=== Object#tap Backport
+
++Object#tap+ is an addition to "Ruby 1.9":http://www.ruby-doc.org/core-1.9/classes/Object.html#M000309 and 1.8.7 that is similar to the +returning+ method that Rails has had for a while: it yields to a block, and then returns the object that was yielded. Rails now includes code to make this available under older versions of Ruby as well.
+
+Lead Contributor: link:http://bitsweat.net/[Jeremy Kemper]
+
+=== Fractional seconds for TimeWithZone
+
+The +Time+ and +TimeWithZone+ classes include an +xmlschema+ method to return the time in an XML-friendly string. As of Rails 2.3, +TimeWithZone+ supports the same argument for specifying the number of digits in the fractional second part of the returned string that +Time+ does:
+
+[source, ruby]
+-------------------------------------------------------
+>> Time.zone.now.xmlschema(6)
+=> "2009-01-16T13:00:06.13653Z"
+-------------------------------------------------------
+
+Lead Contributor: link:http://www.workingwithrails.com/person/13536-nicholas-dainty[Nicholas Dainty]
+
+=== JSON Key Quoting
+
+If you look up the spec on the "json.org" site, you'll discover that all keys in a JSON structure must be strings, and they must be quoted with double quotes. Starting with Rails 2.3, we doe the right thing here, even with numeric keys.
+
+Lead Contributor: link:http://www.koziarski.net/[Michael Koziarski]
+
+=== Other Active Support Changes
+
+* You can use +Enumerable#none?+ to check that none of the elements match the supplied block.
+* If you're using Active Support link:http://afreshcup.com/2008/10/19/coming-in-rails-22-delegate-prefixes/[delegates], the new +:allow_nil+ option lets you return nil instead of raising an exception when the target object is nil.
+* +ActiveSupport::OrderedHash+: now implements +each_key+ and +each_value+.
+* +ActiveSupport::MessageEncryptor+ provides a simple way to encrypt information for storage in an untrusted location (like cookies).
+* Active Support's +from_xml+ no longer depends on XmlSimple. Instead, Rails now includes its own XmlMini implementation, with just the functionality that it requires. This lets Rails dispense with the bundled copy of XmlSimple that it's been carting around.
+
+== Railties
+
+In addition to the Rack changes covered above, Railties (the core code of Rails itself) sports a number of significant changes, including Rails Metal, application templates, and quiet backtraces.
+
+=== Rails Metal
+
+Rails Metal is a new mechanism that provides superfast endpoints inside of your Rails applications. Metal classes bypass routing and Action Controller to give you raw speed (at the cost of all the things in Action Controller, of course). This builds on all of the recent foundation work to make Rails a Rack application with an exposed middleware stack.
+
+* Lead Contributor: link:http://www.loudthinking.com/[David Heinemeier Hansson]
+* More Information:
+ - link:http://weblog.rubyonrails.org/2008/12/17/introducing-rails-metal[Introducing Rails Metal]
+ - link:http://soylentfoo.jnewland.com/articles/2008/12/16/rails-metal-a-micro-framework-with-the-power-of-rails-m[Rails Metal: a micro-framework with the power of Rails]
+ - link:http://www.railsinside.com/deployment/180-metal-super-fast-endpoints-within-your-rails-apps.html[Metal: Super-fast Endpoints within your Rails Apps]
+ - link:http://ryandaigle.com/articles/2008/12/18/what-s-new-in-edge-rails-rails-metal[What's New in Edge Rails: Rails Metal]
+
+=== Application Templates
+
+Rails 2.3 incorporates Jeremy McAnally's "rg":http://github.com/jeremymcanally/rg/tree/master application generator. What this means is that we now have template-based application generation built right into Rails; if you have a set of plugins you include in every application (among many other use cases), you can just set up a template once and use it over and over again when you run the +rails+ command. There's also a rake task to apply a template to an existing application:
+
+[source, ruby]
+-------------------------------------------------------
+rake rails:template LOCATION=~/template.rb
+-------------------------------------------------------
+
+This will layer the changes from the template on top of whatever code the project already contains.
+
+* Lead Contributor: link:http://www.jeremymcanally.com/[Jeremy McAnally]
+* More Info:http://m.onkey.org/2008/12/4/rails-templates[Rails templates]
+
+=== Quieter Backtraces
+
+Building on Thoughtbot's "Quiet Backtrace":http://www.thoughtbot.com/projects/quietbacktrace plugin, which allows you to selectively remove lines from Test::Unit backtraces, Rails 2.3 implements +ActiveSupport::BacktraceCleaner+ and +Rails::BacktraceCleaner+ in core. This supports both filters (to perform regex-based substitutions on backtrace lines) and silencers (to remove backtrace lines entirely). Rails automatically adds silencers to get rid of the most common noise in a new application, and builds a +config/backtrace_silencers.rb+ file to hold your own additions. This feature also enables prettier printing from any gem in the backtrace.
+
+* Lead Contributor: link:http://www.loudthinking.com/[David Heinemeier Hansson]
+
+=== Faster Boot Time in Development Mode with Lazy Loading/Autoload
+
+Quite a bit of work was done to make sure that bits of Rails (and its dependencies) are only brought into memory when they're actually needed. The core frameworks - Active Support, Active Record, Action Controller, Action Mailer and Action View - are now using +autoload+ to lazy-load their individual classes. This work should help keep the memory footprint down and improve overall Rails performance.
+
+You can also specify (by using the new +preload_frameworks+ option) whether the core libraries should be autoloaded at startup. This defaults to +false+ so that Rails autoloads itself piece-by-piece, but there are some circumstances where you still need to bring in everything at once - Passenger and JRuby both want to see all of Rails loaded together.
+
+* Lead Contributors: link:http://bitsweat.net/[Jeremy Kemper] and link:http://joshpeek.com/[Josh Peek]
+
+=== Other Railties Changes
+
+* The instructions for updating a CI server to build Rails have been updated and expanded.
+* Internal Rails testing has been switched from +Test::Unit::TestCase+ to +ActiveSupport::TestCase+, and the Rails core requires Mocha to test.
+* The default +environment.rb+ file has been decluttered.
+* The dbconsole script now lets you use an all-numeric password without crashing.
+* Rails.root now returns a Pathname object, which means you can use it directly with the join method to link:http://afreshcup.com/2008/12/05/a-little-rails_root-tidiness/[clean up existing code] that uses File.join.
+* Various files in /public that deal with CGI and FCGI dispatching are no longer generated in every Rails application by default (you can still get them if you need them by adding +--with-dispatches+ when you run the rails command, or add them later with +rake rails:generate_dispatchers+).
+
+== Deprecated
+
+A few pieces of older code are deprecated in this release:
+
+* If you're one of the (fairly rare) Rails developers who deploys in a fashion that depends on the inspector, reaper, and spawner scripts, you'll need to know that those scripts are no longer included in core Rails. If you need them, you'll be able to pick up copies via the link:http://github.com/rails/irs_process_scripts/tree[irs_process_scripts] plugin.
+* +render_component+ goes from "deprecated" to "nonexistent" in Rails 2.3. If you still need it, you can install the link:http://github.com/rails/render_component/tree/master[render_component plugin].
+* Support for Rails components has been removed.
+* If you were one of the people who got used to running +script/performance/request+ to look at performance based on integration tests, you need to learn a new trick: that script has been removed from core Rails now. There’s a new request_profiler plugin that you can install to get the exact same functionality back.
+* +ActionController::Base#session_enabled?+ is deprecated because sessions are lazy-loaded now.
+* The +:digest+ and +:secret+ options to +protect_from_forgery+ are deprecated and have no effect.
+* Some integration test helpers have been removed. +response.headers["Status"]+ and +headers["Status"]+ will no longer return anything. Rack does not allow "Status" in its return headers. However you can still use the +status+ and +status_message+ helpers. +response.headers["cookie"]+ and +headers["cookie"]+ will no longer return any CGI cookies. You can inspect +headers["Set-Cookie"]+ to see the raw cookie header or use the +cookies+ helper to get a hash of the cookies sent to the client.
+
+== Credits
+
+Release notes compiled by link:http://afreshcup.com[Mike Gunderloy]

0 comments on commit 4290b3c

Please sign in to comment.
Something went wrong with that request. Please try again.