Sha256: 5e249f0b736ab53f6c0fe86b61ed16b8556bedd31cf941358de4992f7a0bee55
Contents?: true
Size: 710 Bytes
Versions: 3
Compression:
Stored size: 710 Bytes
Contents
module Chatroom module MessageHelper def new_communication(msg=nil) "<span class='message-line'> <div class='info-message'> <span class='sender'>:</span><span class='send-time'>#{msg.try(:send_time)}</span> </div> <span class='say'>#{msg.try(:html_content)}</span> </span>" end # Show all the communications in chatroom def show_communications(msgs=nil) msgs ||= [] messages = msgs.collect do |msg| "<span class='message-line'> <div class='info-message'> <span class='sender'>:</span><span class='send-time'>#{msg.try(:send_time)}</span> </div> <span class='say'>#{msg.try(:html_content)}</span> </span>" end messages.join('') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
chatroom-0.1.0 | app/helpers/chatroom/message_helper.rb |
chatroom-0.0.9 | app/helpers/chatroom/message_helper.rb |
chatroom-0.0.8 | app/helpers/chatroom/message_helper.rb |