Rails 4 compatibility
Merge pull request #12 from dmitrydims/rails4

Rails 4 compatibility