Class: ContentProviders::PreviousPlannedActivitiesProvider

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

Overview

Provides a form for a Participant to update previously planned Activities.

Instance Method Summary collapse

Instance Method Details

#data_attributesObject



25
26
27
28
29
30
# File 'app/models/content_providers/previous_planned_activities_provider.rb', line 25

def data_attributes
  [
    :id, :actual_pleasure_intensity, :actual_accomplishment_intensity,
    :noncompliance_reason
  ]
end

#data_class_nameObject



21
22
23
# File 'app/models/content_providers/previous_planned_activities_provider.rb', line 21

def data_class_name
  "Activity"
end

#render_current(options) ⇒ Object



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

def render_current(options)
  activities =
    options
    .participant
    .activities
    .planned

  options.view_context.render(
    template: "think_feel_do_engine/activities/previously_planned_fullpage",
    locals: {
      activities_list: activities.order("start_time ASC"),
      update_path: options.view_context.participant_data_path
    }
  )
end

#show_nav_link?Boolean

Returns:

  • (Boolean)


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

def show_nav_link?
  false
end