質問編集履歴

4

追記しました

2020/08/19 04:45

投稿

n.yom
n.yom

スコア3

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- お世話になっております
1
+ お世話になっております 
2
2
 
3
3
  入力フォームと詳細ページを作成しています。
4
4
 

3

追記しました

2020/08/19 04:45

投稿

n.yom
n.yom

スコア3

test CHANGED
File without changes
test CHANGED
@@ -32,15 +32,15 @@
32
32
 
33
33
  <td><span>
34
34
 
35
- <%= f.select :date_y , @years, {include_blank:true, selected: @news.date_y},{class: getErrFieldClass(@news.errors[:date].any?, "")} %>
35
+ <%= f.select :date_y , @years, {include_blank:true},{class: getErrFieldClass(@news.errors[:date].any?, "")} %>
36
36
 
37
37
  年&nbsp;
38
38
 
39
- <%= f.select :date_m, (1..12).to_a, {include_blank:true, selected: @news.date_m}, {class: getErrFieldClass(@news.errors[:date].any?, "")} %>
39
+ <%= f.select :date_m, (1..12).to_a, {include_blank:true}, {class: getErrFieldClass(@news.errors[:date].any?, "")} %>
40
40
 
41
41
  月&nbsp;
42
42
 
43
- <%= f.select :date_d, (1..31).to_a, {include_blank:true, selected:@news.date_d}, {class: getErrFieldClass(@news.errors[:date].any?, "")} %>
43
+ <%= f.select :date_d, (1..31).to_a, {include_blank:true}, {class: getErrFieldClass(@news.errors[:date].any?, "")} %>
44
44
 
45
45
  日&nbsp;
46
46
 

2

追記しました

2020/08/19 01:03

投稿

n.yom
n.yom

スコア3

test CHANGED
File without changes
test CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  </span></td>
48
48
 
49
- </tr>
49
+ </tr> 
50
50
 
51
51
  ```
52
52
 

1

誤字があったため訂正しました

2020/08/19 01:00

投稿

n.yom
n.yom

スコア3

test CHANGED
File without changes
test CHANGED
@@ -32,15 +32,15 @@
32
32
 
33
33
  <td><span>
34
34
 
35
- <%= f.select :date_y , @years, {include_blank:true, selected: @news.date_y},{class: getErrFieldClass(@m_news.errors[:date].any?, "")} %>
35
+ <%= f.select :date_y , @years, {include_blank:true, selected: @news.date_y},{class: getErrFieldClass(@news.errors[:date].any?, "")} %>
36
36
 
37
37
  年&nbsp;
38
38
 
39
- <%= f.select :end_date_m, (1..12).to_a, {include_blank:true, selected: @news.date_m}, {class: getErrFieldClass(@m_news.errors[:date].any?, "")} %>
39
+ <%= f.select :date_m, (1..12).to_a, {include_blank:true, selected: @news.date_m}, {class: getErrFieldClass(@news.errors[:date].any?, "")} %>
40
40
 
41
41
  月&nbsp;
42
42
 
43
- <%= f.select :end_date_d, (1..31).to_a, {include_blank:true, selected:@news.date_d}, {class: getErrFieldClass(@m_news.errors[:date].any?, "")} %>
43
+ <%= f.select :date_d, (1..31).to_a, {include_blank:true, selected:@news.date_d}, {class: getErrFieldClass(@news.errors[:date].any?, "")} %>
44
44
 
45
45
  日&nbsp;
46
46
 
@@ -72,7 +72,7 @@
72
72
 
73
73
  st = @db.prepare(sql)
74
74
 
75
- st.execute(m_news.end_date || nil)
75
+ st.execute(news.date || nil)
76
76
 
77
77
  st.close
78
78