for rails 3