开发者

Rails 3 scaffold generator alternative

I have looked at the Rails 3 scaffold generator and I would like to modify it a bit. I will make some ch开发者_高级运维anges to the controller and the views.

The modifications should be for admin style controllers so I do not want to override the scaffold generator with it - I need them both. Can I somehow make one called admin_scaffold without having to do a complete new scaffold generator?

  • Jacob


Ryan Bates has made the nifty-generators. You could download his code from gitHub and modify it to suit your needs.

It's generally a bad idea to modify the source code of a framework. You should always use a plugin or hook to define your own custom "stuff". If you work on a development team, you'll make a lot of people angry...

You add hooks into a framework, you don't hack it and change source code. It's against convention and annoying to those you may work with. You also need to take into account future updates, your code could get overwritten or broken...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜