Sha256: eb7d99f243b5671b64efd0acbf9237085a4be2670a44cc56e83072b40b03d322

Contents?: true

Size: 659 Bytes

Versions: 3

Compression:

Stored size: 659 Bytes

Contents

module Chatty::ChatsHelper
  def chatty_chat(chat)
    content_tag(:div, nil, {
      :class => "chatty_chat",
      :data => {
        :chat_id => chat.id,
        :signed_in => signed_in?,
        :can_add_messages => can?(:new, Chatty::Message),
        :need_to_be_signed_in_message => _("You need to be signed in to write messages."),
        :not_allowed_to_add_messages_message => _("You are not allowed to write messages."),
        :waiting_to_connect_message => _("Waiting to connect..."),
        :waiting_to_be_handled_message => _("Waiting to be handled..."),
        :chat_is_closed_message => _("This chat is closed.")
      }
    })
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chatty-0.0.3 app/helpers/chatty/chats_helper.rb
chatty-0.0.2 app/helpers/chatty/chats_helper.rb
chatty-0.0.1 app/helpers/chatty/chats_helper.rb