Rails 2.3 : Object#try

you can avoid nil-checking

@person.try(:name) # @person ? @person.name : nil
@people.try(:collect) {|p| p.name}
Person.try(:find, 1)
Product.find_by_price(4.95).try(:name)

Ruby on Rails 2.3 Release Notes - 7.1 Object#try
Class: Object
Railscasts - Rails 2.3 Extras

rescue_from

Rescue exceptions raised in controller actions.

class ApplicationController < ActionController::Base
  rescue_from ActionController::RoutingError, :with => :route_not_found

  private
  def route_not_found(exception)
    render :text => exception.message.to_s, :status => :not_found
  end
end

has_many :bugs, :through => :rails: Rescue from dispatching
Module: ActiveSupport::Rescuable::ClassMethods
ヽ( ・∀・)ノくまくまー(2008-10-25) rescue_from (ActiveSupport::Rescuable)

Rails 2.2 : Memoization

Memoization is a pattern of initializing a method once and then stashing its value away for repeat use.

extend ActiveSupport::Memoizable

def full_name
  "#{first_name} #{last_name}"
end
memoize :full_name

Ruby on Rails 2.2 Release Notes - 9.1 Memoization
ヽ( ・∀・)ノくまくまー(2008-10-25) Memoization (ActiveSupport::Memoizable)