support rails version >3
Merge pull request #3 from pobing/patch-1

support rails version >3