0
내 앱에는 티켓이있는 프로젝트가 있습니다. 나는 다음과 같은 방법으로 티켓을 보여줄 수 있기를 원하는 모든 티켓, 프로젝트에 속한뿐만 아니라 티켓을 보여주는중첩 된 경로 만들기
/projects/43/tickets
이 경로 작동하지만 결과를. 무엇을 바꾸어야합니까?
경로 :
resources :projects do
resources :tickets do
collection do
get "manage"
end
end
end
모델 : 티켓은 다음과 같은 방법으로 프로젝트에 연결되어
class Ticket < ActiveRecord::Base
belongs_to :project
...
end
class Project < ActiveRecord::Base
has_many :tickets, :dependent => :destroy
...
end
:
Tickets (table)
project_id
...the rest of the fields...