rails 4 compatibility
Merge pull request #3 from dmilisic/master

Rails 4 compatibility (thank you danijel!)