次のエラー メッセージが表示されます。
Template is missing
Missing template dishes/show, application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "C:/Sites/restaurant/app/views"
私の中でdishes_controller
:
def show
@dish = Dish.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @dish }
end
end
テンプレートは欠落していません。の下にありますapp/views/dishes/show.html.erb
の出力C:\Sites\restaurant>rake routes
:
root / static_pages#home
dishes GET /dishes(.:format) dishes#index
POST /dishes(.:format) dishes#create
new_dish GET /dishes/new(.:format) dishes#new
edit_dish GET /dishes/:id/edit(.:format) dishes#edit
dish GET /dishes/:id(.:format) dishes#show
PUT /dishes/:id(.:format) dishes#update
DELETE /dishes/:id(.:format) dishes#destroy
help /help(.:format) static_pages#help
about /about(.:format) static_pages#about
contact /contact(.:format) static_pages#contact
menu /menu(.:format) static_pages#menu