Updated to work with Rails 3.2.13