class PageStatusController
def refresh_response(updated_pages, remaining_pages)
def refresh_response(updated_pages, remaining_pages) if updated_pages.any? updated_pages_count = updated_pages.count { message: "Successfully updated status of #{updated_pages_count} #{'page'.pluralize(updated_pages_count)}.", updated_page_ids: updated_pages, remaining_scheduled_page_ids: remaining_pages, } else { message: 'No scheduled pages matched the criteria for status refresh.', remaining_scheduled_page_ids: remaining_pages, } end end