Class: ContentProviders::PastActivityReviewForm

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#data_attributesObject



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

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

#data_class_nameObject



22
23
24
# File 'app/models/content_providers/past_activity_review_form.rb', line 22

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
20
# File 'app/models/content_providers/past_activity_review_form.rb', line 5

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

  options.view_context.render(
    template: "think_feel_do_engine/activities/past_activity_review",
    locals: {
      activities: activities,
      update_path: options.view_context.participant_data_path
    }
  )
end

#show_nav_link?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/content_providers/past_activity_review_form.rb', line 33

def show_nav_link?
  false
end