Description:
- add compiler comment
- fix error when problem is not present
(grafted from 5dcd02c21a697ca0a770d0aab8380eacc42eba04)
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r659:9e7635d52664 - - 2 files changed: 9 inserted, 4 deleted
@@ -54,8 +54,8 | |||
|
54 | 54 | - @submission.each do |sub| |
|
55 | 55 | %tr.inactive |
|
56 | 56 | %td= link_to sub.id, submission_path(sub.id) |
|
57 | - %td= link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) | |
|
58 | - %td= link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) | |
|
57 | + %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) | |
|
58 | + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) | |
|
59 | 59 | %td= "#{time_ago_in_words(sub.submitted_at)} ago" |
|
60 | 60 | %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " |
|
61 | 61 | %td= sub.grader_comment |
@@ -72,8 +72,8 | |||
|
72 | 72 | - @backlog_submission.each do |sub| |
|
73 | 73 | %tr.inactive |
|
74 | 74 | %td= link_to sub.id, submission_path(sub.id) |
|
75 | - %td= link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) | |
|
76 | - %td= link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) | |
|
75 | + %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) | |
|
76 | + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) | |
|
77 | 77 | %td= "#{time_ago_in_words(sub.submitted_at)} ago" |
|
78 | 78 | %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " |
|
79 | 79 | %td= sub.grader_comment |
You need to be logged in to leave comments.
Login now