make rails 3 compatible
Merge pull request #4 from grosser/rails3

make rails 3 compatible