質問編集履歴
1
自分の実際のメールアドレスの記載をしてしまったため、そちらを省きました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -10,33 +10,23 @@
|
|
10
10
|
▼お問い合わせフォームがあるhome.html.erb
|
11
11
|
```ruby
|
12
12
|
<div class="contact-form-section">
|
13
|
-
|
13
|
+
<%= form_with model: @contact, :url => home_confirm_path do |form| %>
|
14
|
-
|
14
|
+
<% if @contact.errors.any? %>
|
15
|
-
|
15
|
+
<div class="alert alert-warning">
|
16
|
-
|
16
|
+
<ul>
|
17
|
-
|
17
|
+
<% contact.errors.full_messages.each do |message| %>
|
18
|
-
|
18
|
+
<li><%= message %></li>
|
19
|
-
|
19
|
+
<% end %>
|
20
|
-
|
20
|
+
</ul>
|
21
|
-
|
21
|
+
</div>
|
22
|
-
|
22
|
+
<% end %>
|
23
|
-
|
23
|
+
<%= form.email_field :email, :placeholder => "Email", class: "input-email" %>
|
24
|
-
|
24
|
+
<%= form.text_field :name, :placeholder => "Name", class: "input-name" %>
|
25
|
-
|
25
|
+
<%= form.text_field :subject, :placeholder => "Subject", class: "input-subject" %>
|
26
|
-
|
26
|
+
<%= form.text_area :message, :placeholder => "Message...", class: "textarea-message" %>
|
27
|
-
|
27
|
+
<%= form.submit "Confirm", class: "submit-send" %>
|
28
|
-
|
29
|
-
<!----------下記htmlでのformタグ内容---------->
|
30
|
-
<!--<form action="#" method="post">
|
31
|
-
<input class="input-email" type="text" name="email" placeholder="Email*">
|
32
|
-
<input class="input-name" type="text" name="name" placeholder="Name*">
|
33
|
-
<input class="input-subject" type="text" name="subject" placeholder="Subject">
|
34
|
-
<textarea class="textarea-message" name="message" placeholder="Message..."></textarea>
|
35
|
-
<input type="hidden" name="tomail" value="iyasiken@gmail.com">
|
36
|
-
<input class="submit-send" type="submit" value="SEND">
|
37
|
-
</form>-->
|
38
|
-
|
28
|
+
<% end %>
|
39
|
-
|
29
|
+
</div>
|
40
30
|
```
|
41
31
|
|
42
32
|
▼router.rb
|