質問編集履歴

2

html.hamlのフォーム部分のコードを追加

2020/07/16 16:34

投稿

tomoZQ
tomoZQ

スコア14

test CHANGED
File without changes
test CHANGED
@@ -206,6 +206,36 @@
206
206
 
207
207
  ```
208
208
 
209
+ ```haml
210
+
211
+ .show-lists__chat-main__message-form
212
+
213
+ = form_with model: [@group, @message], html: {class: ".show-lists__chat-main__message-form"}, local: true do |f|
214
+
215
+ .show-lists__chat-main__message-form__contents
216
+
217
+ .show-lists__chat-main__message-form__contents__input-space
218
+
219
+ = f.text_field :content, class: '.show-lists__chat-main__message-form__contents__input-space', placeholder: 'type a message'
220
+
221
+ .show-lists__chat-main__message-form__contents__input-space__label
222
+
223
+ = f.label :image, class: '.show-lists__chat-main__message-form__contents__input-space__label' do
224
+
225
+ =icon('far', 'image')
226
+
227
+ .show-lists__chat-main__message-form__contents__input-space__label__hidden
228
+
229
+ = f.file_field :image, class: '.show-lists__chat-main__message-form__contents__input-space__label__hidden'
230
+
231
+ .show-lists__chat-main__message-form__contents__btn-box
232
+
233
+ = f.submit 'Send', class: '.show-lists__chat-main__message-form__contents__input-space__btn-box__Send'
234
+
235
+
236
+
237
+ ```
238
+
209
239
  ```ruby
210
240
 
211
241
  class MessagesController < ApplicationController

1

タグの追加

2020/07/16 16:33

投稿

tomoZQ
tomoZQ

スコア14

test CHANGED
File without changes
test CHANGED
File without changes