Fix for rails 4.2.0
Merge pull request #2 from ecorrons/master

Fix for rails 4.2.0-beta2