Adopt to Rails4.
Merge pull request #76 from igaiga/for_rails4

Adopt to Rails4.