rootstrap/activeadmin-chat

View on GitHub
app/helpers/active_admin/chat/chat_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ActiveAdmin
  module Chat
    module ChatHelper
      def admin_class(message)
        'admin' if message.sender.class == ActiveAdmin::Chat.admin_user_klass
      end

      def selected_class(conversation, active_conversation)
        'selected' if active_conversation && active_conversation == conversation
      end
    end
  end
end