Changes to remove deprecation warnings for Rails 3.2.16