It is a memo of a super beginner
Information sent by form_tag ("url ") do
is inparam []
<%=form_tag("/posts/create") do%>
<div class="form">
<div class="form-body">
<textarea name="content"></textarea>
<input type="submit" value="Post">
</div>
</div>
<% end %>
Refer to it with param [: content]
.
<%= form_tag("/users/create") do %>
<p>username</p>
<input name="name" value="<%= @user.name %>">
<p>mail address</p>
<input name="email" value="<%= @user.email %>">
<input type="submit" value="sign up">
<% end %>
<%= form_tag("URL you want to send") do%>
<p>mail address</p>
<input name="email">
<p>password</p>
<input type="password" name="password">
<input type="submit" value="Login">
<% end %>
Recommended Posts