Fix for Rails 4.0
Merge pull request #2 from jethrogb/topic/rails40

Fix for Rails 4.0