Code Cleanup: Usage of Polymorphic User instead of ExternalUser and InternalUser
Renamed requestor_user_id -> user_id Index of request_for_comments now returns the n (5?) newest requests per user. Solved via sliding windows in postgres, code added to model. Added route to /my_request_for_comments/ that shows all requests for the current user. Changed view from ERB to slim
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
json.array!(@request_for_comments) do |request_for_comment|
|
||||
json.extract! request_for_comment, :id, :requestor_user_id, :exercise_id, :file_id, :requested_at, :user_type
|
||||
json.extract! request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :user_type
|
||||
json.url request_for_comment_url(request_for_comment, format: :json)
|
||||
end
|
||||
|
Reference in New Issue
Block a user