app/queries/corrections_for_user_query.rb
def results(answer)
    query_method = case user
                   when answer.author then :corrections_for_author
                   when nil then :corrections_for_everyone
                   else :corrections_for_rest_users
                   end
    __send__(query_method, corrections_scope(answer))
  end
# Query answer's corrections as viewn by some user.
#
# There are three possible cases.
# - The user is not signed in - only corrections accepted by
#   the answer's author are returned.
# - The user is the answer's author - all corrections are returned.
# - The user is some other user - corrections accepted by
#   the answer's author and corrections made by the user are returned.
# @param answer [Answer]
#   the answer which corrections are to query.
Query answer's corrections as viewn by some user.
There are three possible cases.
The user is not signed in - only corrections accepted by
the answer's author are returned.
The user is the answer's author - all corrections are returned.
The user is some other user - corrections accepted by
the answer's author and corrections made by the user are returned.
Query answer ' s corrections as viewn by some user . There are three possible cases . The user is not signed in - only corrections accepted by the answer ' s author are returned . The user is the answer ' s author - all corrections are returned . The user is some other user - corrections accepted by the answer ' s author and corrections made by the user are returned .
def results(answer)
    query_method = case user
                   when answer.author then :corrections_for_author
                   when nil then :corrections_for_everyone
                   else :corrections_for_rest_users
                   end
    __send__(query_method, corrections_scope(answer))
  end
def results ( answer ) query_method = case user when answer . author then :corrections_for_author when nil then :corrections_for_everyone else :corrections_for_rest_users end __send__ ( query_method , corrections_scope ( answer ) ) end
Query answer's corrections as viewn by some user.
Query answer ' s corrections as viewn by some user .
answer
the answer which corrections are to query.
the answer which corrections are to query .