2
Good afternoon,
I have a service order and need to generate a report through it, this report needs to receive the service order number to save in the order_id column. I’m trying to make a nested route:
My route is this way:
resources :orders do
resources :vegoor_reports, only: [:create]
end
On the show page of my work order I have the way:
<%= link_to 'Laudo', order_vegoor_reports_path(@order), class: 'btn btn-primary' %>
I have the following routes to Orders:
order_vegoor_reports POST /Orders/:order_id/vegoor_reports(.:format) vegoor_reports#create
When I go to the Report button the following error occurs:
No route Matches [GET] "/Orders/1/vegoor_reports"
Can anyone point me in the wrong direction? Thank you
Olá Eduardo, esse link_to é para criar um laudo ou para para o formulário de criação de um laudo?
– Henrique Navarro Marçulo
This link to is to create the form that creates the report.
– Eduardo
I left an answer if you did not understand or that was not what I needed tells me that I make the change.
– Henrique Navarro Marçulo