updates for rails 3