質問編集履歴
4
メソッドの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
Railsアプリケーションを作成しています。都道府県の入力フォームをドロップダウン形式にしたくて以下のようにHTMLを記述しました。
|
2
2
|
|
3
3
|
```ここに言語を入力
|
4
|
+
|
5
|
+
コントローラ
|
6
|
+
|
7
|
+
def new
|
8
|
+
|
9
|
+
@account = Client.new
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
4
16
|
|
5
17
|
new.html.erb
|
6
18
|
|
3
title部分の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
<% @title = '
|
9
|
+
<% @title = '新規登録' %>
|
10
10
|
|
11
11
|
<h1><%= @title %></h1>
|
12
12
|
|
2
nwe.html.erbを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,36 @@
|
|
1
1
|
Railsアプリケーションを作成しています。都道府県の入力フォームをドロップダウン形式にしたくて以下のようにHTMLを記述しました。
|
2
|
+
|
3
|
+
```ここに言語を入力
|
4
|
+
|
5
|
+
new.html.erb
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
<% @title = '代行業者の新規登録' %>
|
10
|
+
|
11
|
+
<h1><%= @title %></h1>
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
<div id="generic-form">
|
16
|
+
|
17
|
+
<%= form_for @account, url: :client_user do |f| %>
|
18
|
+
|
19
|
+
<%= render 'form', f: f %>
|
20
|
+
|
21
|
+
<div class="buttons">
|
22
|
+
|
23
|
+
<%= f.submit '登録' %>
|
24
|
+
|
25
|
+
<%= link_to 'キャンセル', :client_root %>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
</div>
|
32
|
+
|
33
|
+
```
|
2
34
|
|
3
35
|
```ここに言語を入力
|
4
36
|
|
1
誤字の修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Rails5で作成したドロップダウンメニューの
|
1
|
+
Rails5で作成したドロップダウンメニューの値の保存方法をご教授お願します。
|
test
CHANGED
File without changes
|