remove rails 4 deprecation
fix end location