回答編集履歴

2

if文修正

2020/08/26 04:40

投稿

yuichi555
yuichi555

スコア10

test CHANGED
@@ -18,9 +18,9 @@
18
18
 
19
19
 
20
20
 
21
- @timecard.start_time = Time.now if params[:start_btn].present?
21
+ @timecard.start_time = Time.now if params[:start_btn]
22
22
 
23
- @timecard.end_time = Time.now if params[:end_btn].present?
23
+ @timecard.end_time = Time.now if params[:end_btn]
24
24
 
25
25
 
26
26
 

1

name修正

2020/08/26 04:40

投稿

yuichi555
yuichi555

スコア10

test CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  = form_with(url:"/worktimes", local: true, class: "btn_frame") do |f|
4
4
 
5
- =f.submit "出勤", name: "start-btn"
5
+ =f.submit "出勤", name: "start_btn"
6
6
 
7
- =f.submit "退勤", name: "end-btn"
7
+ =f.submit "退勤", name: "end_btn"
8
8
 
9
9
  ```
10
10