Changing to work with Rails 3.2