Fix Rails 3.2 deprecation warnings