Fix rubocop offenses after bundle update
This commit is contained in:
@@ -81,9 +81,9 @@ class RequestForComment < ApplicationRecord
|
||||
|
||||
class << self
|
||||
def with_last_activity
|
||||
joins('join "submissions" s on s.id = request_for_comments.submission_id
|
||||
left outer join "files" f on f.context_id = s.id
|
||||
left outer join "comments" c on c.file_id = f.id')
|
||||
joins('join "submissions" s on s.id = request_for_comments.submission_id ' \
|
||||
'left outer join "files" f on f.context_id = s.id ' \
|
||||
'left outer join "comments" c on c.file_id = f.id')
|
||||
.group('request_for_comments.id')
|
||||
.select('request_for_comments.*, max(c.updated_at) as last_comment')
|
||||
end
|
||||
@@ -91,10 +91,10 @@ class RequestForComment < ApplicationRecord
|
||||
def last_per_user(count = 5)
|
||||
from("(#{row_number_user_sql}) as request_for_comments")
|
||||
.where('row_number <= ?', count)
|
||||
.group('request_for_comments.id, request_for_comments.user_id, request_for_comments.user_type,
|
||||
request_for_comments.exercise_id, request_for_comments.file_id, request_for_comments.question,
|
||||
request_for_comments.created_at, request_for_comments.updated_at, request_for_comments.solved,
|
||||
request_for_comments.full_score_reached, request_for_comments.submission_id, request_for_comments.row_number')
|
||||
.group('request_for_comments.id, request_for_comments.user_id, request_for_comments.user_type, ' \
|
||||
'request_for_comments.exercise_id, request_for_comments.file_id, request_for_comments.question, ' \
|
||||
'request_for_comments.created_at, request_for_comments.updated_at, request_for_comments.solved, ' \
|
||||
'request_for_comments.full_score_reached, request_for_comments.submission_id, request_for_comments.row_number')
|
||||
# ugly, but necessary
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user