두 모델 : 프로젝트 및 작업 (예 : 조인 모델 포함) : project_task는 has_many 관계를 통해 작업을 공유하므로 여러 프로젝트에서 작업을 공유 할 수 있습니다.has_many with relationships with order
position을 project_task 모델의 속성으로 지정했습니다. 이제 주어진 프로젝트를 통해 project_tasks 테이블에서 자신의 위치에 따라 작업에 액세스 할 수 있기를 원합니다.
즉 project.tasks (project_tasks 테이블의 각 작업에 대해 나열된 위치에 따라 정렬 됨).
이것이 가능합니까?
가능한 중복 http://stackoverflow.com/questions/2205618/how-do-i-order-a-has-many-through-association-in-ruby-on-rails) –