-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix timer stop #155
Fix timer stop #155
Conversation
return render_js(:update, :unprocessable_entity) unless @current_timer_session.update(timer_params) | ||
updated_params = timer_params | ||
|
||
updated_params[:timer_end] = user_time_zone.now.asctime if updated_params[:timer_end].blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be moved into the model perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not nicely possible, because a timer session without end time is valid, right?
destroy : Destroy Session | ||
destroy --> Cancel : Cancel Timer | ||
Cancel --> [*] : Return Cancel | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terminology doesn't seem correct yet on a first glance. Let's bring it on an correct it in a separate PR. I find the graph useful. Let's discuss this in person.
return render_js(:update, :unprocessable_entity) unless @current_timer_session.update(timer_params) | ||
updated_params = timer_params | ||
|
||
updated_params[:timer_end] = user_time_zone.now.asctime if updated_params[:timer_end].blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not nicely possible, because a timer session without end time is valid, right?
This PR addresses the tracky issue where stopping a timer session with empty end_time would not finish the session.
Todo