嵌套资源:票务管理功能实现
1. 提交更改
在完成票务创建并关联到特定项目的功能后,需要将更改提交到版本控制系统。具体操作步骤如下:
git add .
git commit -m "Implemented creating tickets for a project"
git push
2. 查看票务
现在已经具备创建票务的能力,接下来要实现查看单个票务的功能。可以使用 show 动作来创建此功能。在显示项目列表时,使用 ProjectsController 的 index 动作;而对于票务,使用 show 动作,因为该页面目前没有用于其他特定用途。
为了测试此功能,在 features/viewing_tickets.feature 文件中编写如下代码:
Feature: Viewing tickets
In order to view the tickets for a project
As a user
I want to see them on that project's page
Background:
Given there is a project called "TextMate 2"
And that project has a ticket:
| title | de
超级会员免费看
订阅专栏 解锁全文
5

被折叠的 条评论
为什么被折叠?



