Skip to content

Commit

Permalink
Adding a documentation on the fetch_items method
Browse files Browse the repository at this point in the history
  • Loading branch information
patelkrunal31 committed Jun 1, 2024
1 parent ad86cad commit e2bbc6a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/mailers/requests_confirmation_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def confirmation_email(request)

private

# fetch_items
#
# Fetches sorted items associated with the current Request object.
#
# @return Array of request_items with item names
def fetch_items(request)
items_sorted = request.request_items.sort_by { |k| k['item_id'] }
item_ids = items_sorted&.map { |item| item['item_id'] }
Expand Down

0 comments on commit e2bbc6a

Please sign in to comment.