Begin by replacing the code that creates the Edit option in the Student controller listing function with the code from listing 21.
首先用清单21中的代码代替用来创建Student控制器的listing函数内的Edit选项的那些代码。
The third command, jruby script\generate scaffold Wish Editor, scaffolds the basic list, create, edit, and delete actions in the editor controller for the wish objects stored in the database.
第三个命令jrubyscript\generatescaffoldWishEditor 提供基本列表和针对存储在数据库中的 wish对象的编辑器控制器操作(创建、编辑和删除)。
For example, to enable product editing support we can implement the HTTP-GET version of our "edit" action method on our Products controller like below and then invoke the "Add View" command.
例如,要支持产品编辑,我们可以象下面这样在Products控制器上实现“Edit”action方法的HTTP - GET版本,然后调用“添加视图”命令。
To save edit changes we can implement the HTTP-POST version of our "edit" action method on our Products controller.
要保存编辑后的改动,我们可以在Products控制器中实现“Edit”action方法的HTTP - POST版本。
Next, add a function to the Student controller called edit , which is where the edit option is pointing.
接下来,向Student控制器添加一个函数,称为edit,这也是edit选项所指向的位置。
Now you need to edit one more generated file, just a bit, to get the controller to use the scaffold
现在需要编辑一个或多个生成的文件(只需稍加编辑)来让控制器去使用支架
As we saw for the edit functionality, we need to make a slight enhancement to the controller.
正如我们看到的编辑(edit)功能,我们需要对控制器进行轻微的增强。
Enter controller in the Alias edit field and click next.
在Alias编辑字段中输入controller,单击Next。
The core actions of a Rails controller-new, create, edit, update-typically do not vary, especially if the controller is largely there for CRUD operations.
Rails控制器的核心操作—new、create、edit和update—通常不变,尤其是当控制器大部分用于CRUD操作时。
The controller can edit and transmit some characters, Chinese characters and pictures of LED display screen within 200 meters.
该控制器能够完成LED显示屏所要显示的字符、汉字、图片的编辑和实现200米以内的数据传送。
The controller can edit and transmit some characters, Chinese characters and pictures of LED display screen within 200 meters.
该控制器能够完成LED显示屏所要显示的字符、汉字、图片的编辑和实现200米以内的数据传送。
应用推荐