Fix Generator's compatibility with Rails 3.x

(Fixes #185)