This mistake, I got caught twice. The first time I didn't get an error, but for some reason I can't post! There is no error statement, so you can't even search for it! I was worried.
Why is the second time (yesterday)! I thought, but it seems that the same thing happened a few months ago ... So I was able to solve it.
Also, keep a record so that the same thing does not happen.
Specifically, the following things have occurred.
① Fill out the submission form
(2) Fill in the required items and press "Kiroku" to return to the initial screen for some reason. The URL is also strange.
It was a simple thing. I put the form tag inside the form tag.
ruby:new.html.erb
<form>
<%= form_for(@post) do |f| %>
~ Abbreviation ~
<% end %>
</form>
Nesting form elements is prohibited. I want to be careful.
form tags cannot be nested & how to deal with them [Form tag nesting and browser interpretation](https://ja.stackoverflow.com/questions/30651/form%E3%82%BF%E3%82%B0%E3%81%AE%E5%85%A5 % E3% 82% 8C% E5% AD% 90% E3% 81% A8% E3% 83% 96% E3% 83% A9% E3% 82% A6% E3% 82% B6% E3% 83% BC% E3 % 81% AE% E8% A7% A3% E9% 87% 88)
Recommended Posts