remove unnecessary #to_s

String interpolation already takes care of that
removes code duplication by extracting condition beforehand
extracts method and deletes comment
extracts method to fetch notification type and refactors methods