Use Rails::VERSION::MAJOR instead of Rails.version 

Last week in rails master branch was changed the Rails.version method. Now it returns a Gem::Version object instead of a String ( rails/rails@c07e1515f7c66f5599cbb3c7e9fe42e166bf3edc ).

Due to this change the comparison of Rails.version with a String and Rails.version.to_i are failing.

I have updated the gem to use Rails::VERSION::MAJOR, already used in several places in this gem.