2. ActionPack

You now have the option of making ERB templates swallow up the newlines by using < if someting -> instead of just < if something >.

For example:
    class SomeController < AbstractApplicationController
    <% if options[:scaffold] %>
      scaffold :<%= singular_name %>
    <% end %>
      helper :post
...produces this on post as singular_name:
    class SomeController < AbstractApplicationController

      scaffold :post

      helper :post
...where as:
    class SomeController < AbstractApplicationController
    <% if options[:scaffold] -%>
      scaffold :<%= singular_name %>
    <% end -%>
      helper :post
...produces:
    class SomeController < AbstractApplicationController
      scaffold :post
      helper :post

There is now a new container for cookies that makes them more intuative to use. The old methods of cookie and @cookies have been deprecated.

Examples for writing:
    cookies["user_name"] = "david" # => Will set a simple session cookie
    cookies["login"] = { "value" => "XJ-122", "expires" => Time.now + 360} # => Will set a cookie that expires in 1 hour
 
Examples for reading:
    cookies["user_name"] # => "david" 
    cookies.size         # => 2
NOTE: If you were using the old accessor (cookies instead of @cookies), this could potentially break your code—if you expect a full cookie object!

You can now define method_missing on a controller which will handle all requests for actions not otherwise defined.

Controllers will automatically require their own helper if possible. So instead of doing:

Before:
    class MsgController < AbstractApplicationController
      helper :msg
    end
After:
    class MsgController < AbstractApplicationController
    end
There is a new dependency model with the class methods model, service, and observer. Example:
    class MsgController < AbstractApplicationController
      model    :post, :comment, :attachment
      service  :notification_service
      observer :comment_observer
    end
These new “keywords” remove the need for explicitly calling ‘require’ in most cases. The observer method even instantiates the observer as well as requiring it.

render_partial will always by default include a counter with value 1 unless there is a counter passed in via the local_assigns hash that overrides it. As a result, render_collection_of_partials can still be written in terms of render_partial and partials that make use of a counter can be called without problems from both render_collection_of_partials as well as render_partial

A new kernel method called require_dependency has been added which behaves exactly like require but registers the file for automatic reloading.
    require 'login_system'
becomes
    require_dependency 'login_system'
You should replace every occurrence of require in your project with require_dependency otherwise you can hit some strange behavior.