Updating for rails 3.