내 routes.rb
파일에서 rails3의 하위 도메인 제약 기능을 사용하고 싶지만 특정 도메인을 모든 경로에서 제외하고 싶습니다. 특정 하위 도메인에 특정 컨트롤러를 갖고 싶지 않습니다. 그렇게 할 때 가장 좋은 방법은 무엇입니까?하위 도메인 제약 조건 및 특정 하위 도메인 제외
# this subdomain i dont want all of the catch all routes
constraints :subdomain => "signup" do
resources :users
end
# here I want to catch all but exclude the "signup" subdomain
constraints :subdomain => /.+/ do
resources :cars
resources :stations
end
이 기술을 도와 주셔서 감사합니다. 나는 그 패턴을 첫 번째 비트와 이후의 추가 문자와 패턴이 일치하지 않게하기 위해 정규식을 더 제한하기 위해 직접 수정했다. –
@edgerunner Rubular 링크도 주셔서 감사합니다! – scarver2