Fix some Rails 4 deprecations