make work with rails4
Merge pull request #2 from bigloser/make_work_rails4

make work with rails4