Add Rails 4 compatibility