Rails 4 compatibility
removes deprecation warnings