Sha256: 4bdf6c5b3e41e588747cc37d5972c6edbbf329f023efead4065b3411a50e7142
Contents?: true
Size: 462 Bytes
Versions: 8
Compression:
Stored size: 462 Bytes
Contents
require 'thredded/at_notification_extractor' module Thredded class AtUsers def self.render(content, messageboard) at_names = AtNotificationExtractor.new(content).extract members = messageboard.members_from_list(at_names) members.each do |member| member_path = Thredded.user_path(member) content.gsub!(/@#{member.to_s}/i, %Q{<a href="#{member_path}">@#{member}</a>}) end content end end end
Version data entries
8 entries across 8 versions & 1 rubygems