add support for rails 4.0
Merge pull request #490 from hasimo/rails4

support for rails 4.0