Class: ContentProviders::NewMessageFormProvider

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

Overview

Provides a form for a Participant to compose a new Message.

Instance Method Summary collapse

Instance Method Details

#data_attributesObject



28
29
30
# File 'app/models/content_providers/new_message_form_provider.rb', line 28

def data_attributes
  [:body, :recipient_id, :recipient_type, :subject]
end

#data_class_nameObject



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

def data_class_name
  "Message"
end

#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/new_message_form_provider.rb', line 5

def render_current(options)
  view = options.view_context
  authorize! options.participant, view
  view.render(
    template: "think_feel_do_engine/messages/new",
    locals: {
      compose_path: view.params[:compose_path],
      create_path: view.participant_data_path,
      message: message_for_reply(options),
      new_message: message(options.participant),
      recipient: view.params[:recipient],
      recipient_id: view.params[:recipient_id],
      recipient_type: view.params[:recipient_type],
      subject: view.params[:subject],
      tool: content_module.tool
    }
  )
end

#show_nav_link?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/models/content_providers/new_message_form_provider.rb', line 32

def show_nav_link?
  false
end