Better Rails 4 compatibility