質問編集履歴
1
追記の依頼
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,7 +72,125 @@
|
|
72
72
|
|
73
73
|
```
|
74
74
|
|
75
|
-
|
75
|
+
new.html.erb
|
76
|
+
|
77
|
+
```<%= form_for(@require) do |f| %>
|
78
|
+
|
79
|
+
<% if @require.errors.any? %>
|
80
|
+
|
81
|
+
<div id="error_explanation">
|
82
|
+
|
83
|
+
<h2><%= pluralize(@require.errors.count, "error") %> prohibited this require from being saved:</h2>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<ul>
|
88
|
+
|
89
|
+
<% @require.errors.full_messages.each do |message| %>
|
90
|
+
|
91
|
+
<li><%= message %></li>
|
92
|
+
|
93
|
+
<% end %>
|
94
|
+
|
95
|
+
</ul>
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
<% end %>
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<div class="field">
|
104
|
+
|
105
|
+
<%= f.label :name %><br>
|
106
|
+
|
107
|
+
<%= f.text_field :name %>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
<div class="field">
|
112
|
+
|
113
|
+
<%= f.label :tel %><br>
|
114
|
+
|
115
|
+
<%= f.text_field :tel %>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
<div class="field">
|
120
|
+
|
121
|
+
<%= f.label :email %><br>
|
122
|
+
|
123
|
+
<%= f.text_field :email %>
|
124
|
+
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="field">
|
128
|
+
|
129
|
+
<%= f.label :require_date %><br>
|
130
|
+
|
131
|
+
<%= f.date_select :require_date %>
|
132
|
+
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="field">
|
136
|
+
|
137
|
+
<%= f.label :require_time %><br>
|
138
|
+
|
139
|
+
<%= f.time_select :require_time %>
|
140
|
+
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div class="field">
|
144
|
+
|
145
|
+
<%= f.label :gender %><br>
|
146
|
+
|
147
|
+
<%= f.text_field :gender %>
|
148
|
+
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<div class="field">
|
152
|
+
|
153
|
+
<%= f.label :age %><br>
|
154
|
+
|
155
|
+
<%= f.text_field :age %>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div class="field">
|
160
|
+
|
161
|
+
<%= f.label :occupation %><br>
|
162
|
+
|
163
|
+
<%= f.text_field :occupation %>
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
<div class="actions">
|
168
|
+
|
169
|
+
<%= f.submit %>
|
170
|
+
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<% end %>
|
174
|
+
|
175
|
+
```
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
find.html.erb
|
182
|
+
|
183
|
+
```
|
184
|
+
|
185
|
+
<div class = "buildingpage-right">
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<div class = "requireSelect">
|
190
|
+
|
191
|
+
<%= link_to "問い合わせページ", new_require_path(@building) %>
|
192
|
+
|
193
|
+
```
|
76
194
|
|
77
195
|
|
78
196
|
|
@@ -81,3 +199,7 @@
|
|
81
199
|
buildingモデルはuserモデルとも紐付けされています。そちらはcurrent_userが使えるのでusr_idを反映させることができているのですが、、、
|
82
200
|
|
83
201
|
初心者ですがどうぞよろしくお願いします。
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
viewを追記致しました。よろしくお願いいたします。
|