coachings GET /coachings(.:format) {:action=>"index", :controller=>"coachings"}
POST /coachings(.:format) {:action=>"create", :controller=>"coachings"}
new_coaching GET /coachings/new(.:format) {:action=>"new", :controller=>"coachings"}
edit_coaching GET /coachings/:id/edit(.:format) {:action=>"edit", :controller=>"coachings"}
coaching GET /coachings/:id(.:format) {:action=>"show", :controller=>"coachings"}
PUT /coachings/:id(.:format) {:action=>"update", :controller=>"coachings"}
DELETE /coachings/:id(.:format) {:action=>"destroy", :controller=>"coachings"}
мои маршруты верны, вот мой индекс просмотра
<% = link_to «Уничтожить», тренировка,: подтвердить «Вы уверены?»,: Метод =>: уничтожить%>
вот мой контроллер
def destroy
@coaching = Coaching.find(params[:id])
@coaching.destroy
respond_to do |format|
format.html { redirect_to coachings_path }
format.json { head :ok }
end
end
есть идеи, почему я получаю эту ошибку? Я новичок в RoR, это мои первые проекты, которые я сделал сам.