1
내가 4마이그레이션 경로는 4
몇 가지 문제를 만들어 내 능숙에 대한 몇 가지 추가 경로가 있습니다 레일 3 응용 프로그램을 내 레일을 마이그레이션에 대한 생각 레일. 나는 나의 경로 파일에이 라인에 대한 오류 메시지가 :
resources :teams do
...
get 'apply' => 'teams#apply_membership', as: :apply_membership
post 'apply' => 'teams#apply_membership_save', as: :apply_membership
...
이것은 생성 된 오류 메시지 rails3 GET 및이를 이용한 포스트 경로를 정의 할 수 있었다에서
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
http://guides.rubyonrails.org/routing.html#restricting-the-routes-created
별칭을 만들고 다른 컨트롤 메서드로 라우팅합니다.
rails4에서도이 작업을 수행 할 수 있습니까? 그렇다면 경로 파일에서 어떻게 보이야합니까?