我创建了一个 form_tag 表单:
<%= form_tag(set_image_dokumente_path) do %>
<%= text_field_tag :shit,'', data: {autocomplete_source: search2_patients_path}, :class => "shit" %>
<% end %>
我尝试路由到 dokumente 控制器的 set_image 操作,但出现错误:
undefined local variable or method `set_image_dokumente_path' for #<#<Class:0x711ff60>:0x762d578>
默认情况下,我的 form_tag 转到 dokumente 控制器索引操作!我的路线:
resources :images
get "dokumente/index"
post "dokumente/index"
match 'patients/list' => 'patients#list'
resources :patients do
collection do
get :search2
end
end
我该如何改变它?