Rails6でRSSを出力すべく下記の手順でコードを
書きましたが、エラーになってしまいます。
どこの手順が誤っているのかわかりません。
articles_controller.rb
def feed
@articles = Article.all.order(created_at: :desc).page(params[:page]).per(6)
end
routes.rb
get 'articles/feed'
views/articles/feed.html.rss
<rss version='2.0'>
<channel>
<title>1Kエクストリーム:更新情報</title>
<link>https://www.onekextreme.com/</link>
<description>1Kエクストリーム ブログ:新着</description>
<% @articles.each do |article| %>
<item>
<title><%= article.title %></title>
<link>https://www.onekextreme.com/articles/#{article.id}</link>
<description><%= article.content1 %></description>
<pubDate><%= article.created_at.strftime("%Y.%m.%d") %></pubDate>
</item>
<% end %>
</channel>
</rss>
ローカル環境でエラー
http://localhost:3000/articles/feed
ArticlesController#feed is missing a template for request formats: text/html
NOTE!
Unless told otherwise, Rails expects an action to render a template with the same name,
contained in a folder named after its controller. If this controller is an API responding with 204 (No Content),
which does not require a template, then this error will occur when trying to access it via browser,
since we expect an HTML template to be rendered for such requests. If that's the case, carry on.