This document summarizes the key new features in Rails 2.1, including time zone support, dirty tracking, gem dependencies, named scopes, UTC-based migrations, and improved caching. It provides examples of using each new feature and recommends additional resources for learning more. The major changes are time zone and dirty tracking functionality, easier gem management through dependencies, more powerful querying with named scopes, migration IDs that avoid conflicts, and enhanced caching configuration options.
7. $ rake -T time
(in /Users/keithpitty/work/rails2.1demo)
rake time:zones:all # Displays names of all time zones recognized by the...
rake time:zones:local # Displays names of time zones recognized by the Rai...
rake time:zones:us # Displays names of US time zones recognized by the ...
8. $ rake time:zones:local
* UTC +10:00 *
Brisbane
Canberra
Guam
Hobart
Melbourne
Port Moresby
Sydney
Vladivostok
17. class ApplicationController < ActionController::Base
helper :all
protect_from_forgery
include AuthenticatedSystem
before_filter :set_user_time_zone
private
def set_user_time_zone
Time.zone = current_user.time_zone if logged_in?
end
end
25. $ rake -T gem
(in /Users/keithpitty/work/rails2.1demo)
rake gems # List the gems that this rails application ...
rake gems:build # Build any native extensions for unpacked gems
rake gems:install # Installs all required gems for this applic...
rake gems:unpack # Unpacks the specified gem into vendor/gems.
rake gems:unpack:dependencies # Unpacks the specified gems and its depende...
rake rails:freeze:gems # Lock this application to the current gems ...