开发者

Create scaffold by skipping the model

I have rails 2.3 and ruby 1.8.7

I want to create only a controller and view files for it. Is there any command in rails2.3 that will help me in doing this. I k开发者_如何学编程now this can be done in rails 3, but is there a way to do this in rails 2.3


Just say script/generate controller [controller_name] [action_name_1] [action_name_2] ... in the Rails directory to create a controller with the given actions and corresponding view files.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜