0
Group:
has_many :booth_marketing_messages, :dependent => :destroy
Booth Marketing Message:
belongs_to :group
경로 :
resources :groups do
member do
get :get_group_links
get :booth_marketing_messages
end
resources :booth_marketing_messages do
member do
match :toggle_activation
end
end
end
내가 가진보기가 새로운 부스 마케팅 메시지의 작성 :
booth_marketing_messages_group GET /groups/:id/booth_marketing_messages(.:format)
{:action=>"booth_marketing_messages", :controller=>"groups"}
group_booth_marketing_messages GET
/groups/:group_id/booth_marketing_messages(.:format)
{:action=>"index", :controller=>"booth_marketing_messages"}
:
<% form_for :asset, :url => (defined?(msg) ? group_booth_marketing_message_path(msg) :
group_booth_marketing_messages_path), :html => { :multipart => true, :method =>
(defined?(msg) && msg ? :put : :post) } do |f| -%>
.......
내가 레이크 경로를 실행하는 경우를
그러나 내 부스 마케팅 메시지 컨트롤러에는 색인 작업이 없습니다. 네,이 길은 실패하지 않습니다, 그게 어때요?
resources :booth_marketing_messages do
member do
match :toggle_activation
end
end
로
난 당신이 sayign 무엇인지 이해하는 새로운 액션을 제외한 모든 경로를 작성합니다 그러나 "당신이 그 URL로 갈 때 당신은 발견되지 않은 행동의 오류를 갖거나 컨트롤러는 존재하지 않을 것입니다." - 그게다고, 나는 BoothMarketingMessagesController에 대한 색인 작업/색인보기가 없지만 '새로운'작업의 양식에서 언급 한 URL은 어떤 오류도 발생시키지 않습니다 ... 왜 오류를 던지지 않았는지 알고 싶습니까? – user1865578
브라우저에 해당 URL을 입력하면 "알 수없는 작업"과 같은 오류가 표시되지 않습니다. 그래서 대신 무엇을 얻는거야? 어떤 페이지? – jbmyid
예는 오류를 던지고되지 않지만 대신 GET booth_marketing_messages_group – user1865578