fix for Rails 4.1.0+
Merge pull request #1 from bartoszkopinski/rails-4-1-fix

fix for Rails 4.1.0+