-1
OS Windows-Ruby on Rails, atom
ich eine Aktion mit dem Controller hinzugefügt
def who_bought
@product = Product.find(params[:id])
@latest_order = @product.orders.order(:updated_at).last
if stale?(@latest_order)
respond_to do |format|
format.html
format.atom
end
end
end
Dann habe ich eine Datei who_bougth.atom.builder
im Browser localhost eingeben: 3000/Produkte/3/who_bought.atom
Eine Fehlermeldung
ProductsController#who_bought is missing a template for this request format and variant. request.formats: ["application/atom+xml"] request.variant: []
angezeigt wird,
Ihre Schreibweise für Datei who_bougth.atom.builder ist falsch sollte es sein who_bought.atom.builder –
Danke, ich habe dies nicht gesehen –
@RazvitOk Ich habe dies als eine Antwort geschrieben, wenn Sie meine Antwort als akzeptiert markieren könnten. –