Rails 3 fix