html & rails notes

Introduction

It is a memo of a super beginner

Form

New post form

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].

New user registration

<%= 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 %>

Login form

 <%= 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

html & rails notes
Rails Tutorial Chapter 5 Notes
Rails Tutorial Chapter 10 Notes
Rails Tutorial Chapter 3 Notes
Rails Tutorial Chapter 4 Notes
Rails Tutorial Chapter 8 Notes
rails tutorial fighting notes Ⅲ
[Rails g.error]
Rails basics
Rails Review 1
Rails API
Rails migration
[Rails] first_or_initialize
JUnit 4 notes
rails tutorial
About Rails 6
Rails foundation
Rails memorandum
rails tutorial
java notes
rails tutorial
Notes on using FCM with Ruby on Rails
[Rails] devise
synchronized notes
rails tutorial
rails tutorial
Rails Tips
rails method
rails tutorial
Rails validation and null: false Personal notes
[Rails] ActiveRecord
[Rails] form_with
Rails Review 2
Notes on building Rails6 / PostgreSQL with Docker Compose
Rails CSRF measures and html files under public