Make it compatible with Rails 4.2
Merge pull request #6 from deepj/master

Make it compatible with Rails 4.2