fixes rails 4 deprecations