https://teratail.com/questions/201930
こちらで質問させていただき
コントローラーを
def create @Chat = chat.new(message_params) @Chat.save end
から
def create @chat = chat.new(message_params) @chat.save end
に変えましたところArgumentErrorになったのですが、
https://gyazo.com/b9baf34c779e15314f098dc86b25e48e
<%= form_for @chat, url: "/chats", method: "post" do |f| %> <%= f.text_field :comment, class: "top__contentbox__right__submit__message" %> <%= f.submit %> <% end %>
こうなると<%= form_for @Chat, url: "/chats", method: "post" do |f| %>の飛ばし先URLの指定が間違いなのかと思うのですが、rake routes では
https://gyazo.com/f62f91cc7b445e5d48409ee45b28d0cd
chatsとなっているんです。この書き方ではchatコントローラーに飛ばないんでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。