make it work with rails4
Merge pull request #1 from bigloser/make_it_work_with_rails4

make it work with rails4