fix tests for Rails master
add support for Rails 4
Merge pull request #7 from frodsan/rails4_support

Rails4 support