Fixes compatibility issue with newer versions of railties
Make it compatible with Rails 4.1
Test on Travis for Rails 4.0 and 4.1