Sha256: ca4c6d9ef449438f759767811535c74f0c1fb7e2f966c40c5f4981e756878bcf
Contents?: true
Size: 424 Bytes
Versions: 1
Compression:
Stored size: 424 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| content.gsub!(/@#{member.to_s}/i, %Q{<a href="/users/#{member.to_s}">@#{member.to_s}</a>}) end content end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thredded-0.0.3 | lib/thredded/at_users.rb |