Skip to content

Commit 07a9189

Browse files
Update method documentation from code review
1 parent 5e44ac6 commit 07a9189

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

app/controllers/confirmation_controller.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ def confirmation_params
3333
params.require(:confirmation).permit(:term_id, :category_id, :user_id)
3434
end
3535

36-
# feedback_for takes the result of the confirmation.save directive above and sets an appropriate flash message.
37-
#
38-
# The final else clause is likely to be difficult to provoke, so we are sending a Sentry message in that block in
39-
# order to prompt further investigation.
36+
# feedback_for defines an appropriate flash message, based on whether the user has placed the term in the "flagged"
37+
# category or not.
4038
def feedback_for(flagged)
4139
if flagged == true
4240
flash[:success] = 'Term flagged for review'
@@ -67,8 +65,8 @@ def flag_term(term_id)
6765
t.save
6866
end
6967

70-
# confirmation_flag? compares the submitted category (coerced to an integer) to the ID value for the "flagged" category. We
71-
# do this at least twice in this controller.
68+
# confirmation_flag? compares the submitted category (coerced to an integer) to the ID value for the "flagged"
69+
# category.
7270
#
7371
# @param submission e.g. params[:confirmation][:category]
7472
# @return boolean

0 commit comments

Comments
 (0)