Class: ContentProviders::MessagesIndexProvider

Inherits:
BitCore::ContentProvider
  • Object
show all
Defined in:
app/models/content_providers/messages_index_provider.rb

Overview

Provides a UI for viewing sent and received Messages.

Instance Method Summary collapse

Instance Method Details

#render_current(options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/models/content_providers/messages_index_provider.rb', line 5

def render_current(options)
  sent_messages =
    options
    .participant
    .sent_messages
    .order("messages.sent_at DESC")
  options.view_context.render(
    template: "think_feel_do_engine/messages/index",
    locals: {
      coach: options.participant.coach,
      sent_messages: sent_messages,
      received_messages: received_messages(options.participant),
      compose_path: compose_path(options.view_context),
      show_path: show_path(options.view_context),
      tool: content_module.tool
    }
  )
end

#show_nav_link?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/content_providers/messages_index_provider.rb', line 24

def show_nav_link?
  false
end