我认为这是:
<%= form_for @comment, :as => :post, :url => user_ticket_message_comments_path, :html => { :class => "add-comment", :id => "add-comment-" + @ticket.id.to_s } do |f| %>
<%= f.label :body, "Add comment" %>
<%= f.text_area :body %>
<%= f.submit "Add comment" %>
<% end %>
在我的 routes.rb 中:
resources :users do
resources :tickets do
resources :messages do
resources :comments
end
end
end
我收到路由错误:
No route matches {:controller=>"comments"}