Class: ContentProviders::PastActivityForm

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

Overview

Provides multiple forms for a Participant to enter past Activities.

Instance Method Summary collapse

Instance Method Details

#data_attributesObject



17
18
19
20
21
22
23
24
25
# File 'app/models/content_providers/past_activity_form.rb', line 17

def data_attributes
  [
    :start_time,
    :end_time,
    :activity_type_title,
    :actual_pleasure_intensity,
    :actual_accomplishment_intensity
  ]
end

#data_class_nameObject



27
28
29
# File 'app/models/content_providers/past_activity_form.rb', line 27

def data_class_name
  "Activity"
end

#render_current(options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/models/content_providers/past_activity_form.rb', line 5

def render_current(options)
  participant = options.view_context.current_participant
  options.view_context.render(
    template: "think_feel_do_engine/activities/past_activity_form",
    locals: {
      timestamps: timestamps(participant),
      activity: participant.activities.build,
      create_path: options.view_context.participant_data_path
    }
  )
end

#show_nav_link?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'app/models/content_providers/past_activity_form.rb', line 31

def show_nav_link?
  false
end