質問編集履歴
1
ビューファイルを追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -64,6 +64,90 @@
|
|
64
64
|
end
|
65
65
|
```
|
66
66
|
|
67
|
+
```html
|
68
|
+
<%=form_with model: @charter_user, local: true do |f|%>
|
69
|
+
<div class='chat-room-form__field'>
|
70
|
+
<div class='chat-room-form__field--left'>
|
71
|
+
<%= f.label :出発地, class: 'chat-room-form__label'%>
|
72
|
+
</div>
|
73
|
+
<div class='chat-room-form__field--right'>
|
74
|
+
<%= f.text_field :departure, class: 'chat__room_name chat-room-form__input', placeholder: '出発地を入力してください'%>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
<div class='chat-room-form__field'>
|
78
|
+
<div class='chat-room-form__field--left'>
|
79
|
+
<%= f.label :到着地, class: 'chat-room-form__label'%>
|
80
|
+
</div>
|
81
|
+
<div class='chat-room-form__field--right'>
|
82
|
+
<%= f.text_field :arrive, class: 'chat__room_name chat-room-form__input', placeholder: '到着地を入力してください'%>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
<div class='chat-room-form__field'>
|
86
|
+
<div class='chat-room-form__field--left'>
|
87
|
+
<%= f.label :才数, class: 'chat-room-form__label'%>
|
88
|
+
</div>
|
89
|
+
<div class='chat-room-form__field--right'>
|
90
|
+
<%= f.text_field :size, class: 'chat__room_name chat-room-form__input', placeholder: '才数'%>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div class='chat-room-form__field'>
|
94
|
+
<div class='chat-room-form__field--left'>
|
95
|
+
<%= f.label :到着希望日, class: 'chat-room-form__label'%>
|
96
|
+
</div>
|
97
|
+
<div class='chat-room-form__field--right'>
|
98
|
+
<%= f.text_field :delivery_date, class: 'chat__room_name chat-room-form__input', placeholder: '2020-01-01'%>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
<div class='chat-room-form__field'>
|
102
|
+
<div class='chat-room-form__field--left'>
|
103
|
+
<%= f.label :希望価格, class: 'chat-room-form__label'%>
|
104
|
+
</div>
|
105
|
+
<div class='chat-room-form__field--right'>
|
106
|
+
<%= f.text_field :buy_price, class: 'chat__room_name chat-room-form__input', placeholder: '50000'%>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div class='chat-room-form__field'>
|
110
|
+
<%# 都道府県をActiveHashにする %>
|
111
|
+
<div class='chat-room-form__field--left'>
|
112
|
+
<%= f.label :都道府県, class: 'chat-room-form__label'%>
|
113
|
+
</div>
|
114
|
+
<div class='chat-room-form__field--right'>
|
115
|
+
<%= f.text_field :prefecture_id, class: 'chat__room_name chat-room-form__input', placeholder: '東京都'%>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
<div class='chat-room-form__field'>
|
119
|
+
<div class='chat-room-form__field--left'>
|
120
|
+
<%= f.label :市区町村, class: 'chat-room-form__label'%>
|
121
|
+
</div>
|
122
|
+
<div class='chat-room-form__field--right'>
|
123
|
+
<%= f.text_field :city, class: 'chat__room_name chat-room-form__input', placeholder: '千代田区'%>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
<div class='chat-room-form__field'>
|
127
|
+
<div class='chat-room-form__field--left'>
|
128
|
+
<%= f.label :番地, class: 'chat-room-form__label'%>
|
129
|
+
</div>
|
130
|
+
<div class='chat-room-form__field--right'>
|
131
|
+
<%= f.text_field :charter_address, class: 'chat__room_name chat-room-form__input', placeholder: '1-1'%>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
<div class='chat-room-form__field'>
|
135
|
+
<div class='chat-room-form__field--left'>
|
136
|
+
<%= f.label :建物名, class: 'chat-room-form__label'%>
|
137
|
+
</div>
|
138
|
+
<div class='chat-room-form__field--right'>
|
139
|
+
<%= f.text_field :build_name, class: 'chat__room_name chat-room-form__input', placeholder: '〇〇ビル〇〇'%>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
<div class='chat-room-form__field'>
|
143
|
+
<div class='chat-room-form__field--left'>
|
144
|
+
<%= f.label :電話番号, class: 'chat-room-form__label'%>
|
145
|
+
</div>
|
146
|
+
<div class='chat-room-form__field--right'>
|
147
|
+
<%= f.text_field :tell_number, class: 'chat__room_name chat-room-form__input', placeholder: '09012345678'%>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
```
|
67
151
|
### 試してみたこと
|
68
152
|
コントローラーの記述で
|
69
153
|
permit以降の記述を:user_id current_user.idに変えてみましたが改善しませんでした。
|