質問編集履歴

1

コードの詳細を追記しました

2018/03/08 01:38

投稿

lyzmfeqpxs54
lyzmfeqpxs54

スコア237

test CHANGED
File without changes
test CHANGED
@@ -18,11 +18,19 @@
18
18
 
19
19
  ```Ruby
20
20
 
21
-
21
+ @listsは"xxx,yyy,zzz"のような形でセレクトタグの表示するようのリストが文字列で入っており、strAryにカンマ区切りで格納しております。
22
22
 
23
23
  show.html.erb
24
24
 
25
+ <%= form_with(model: @userinfo, local: true, html: {id: 'inform_save', class: 'form', method: "post", autocomplete: 'off'}) do |f| %>
26
+
27
+ <% strAry = @lists.split(",") %>
28
+
29
+ <%= select_tag 'move[point]', options_for_select(strAry) %>
30
+
25
- <%= f.submit '画面を移動', formtarget: "_blank" %>
31
+ <%= f.submit 'ホーム画面を見る', formtarget: "_blank" %>
32
+
33
+ <% end %>
26
34
 
27
35
 
28
36