fixed rails 4 compatibility
Merge pull request #16 from ttp/master

Rails 4 compatibility