Class: ThinkFeelDoEngine::Coach::ParticipantActivitiesVisualizationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/think_feel_do_engine/coach/participant_activities_visualizations_controller.rb

Overview

Present Participant Activities Visualization to the Coach.

Defined Under Namespace

Classes: RenderOptions

Constant Summary

Constants inherited from ApplicationController

ApplicationController::CSRF_COOKIE_NAME, ApplicationController::CSRF_HEADER_NAME, ApplicationController::INACTIVE_MESSAGE, ApplicationController::ROOT_URI

Instance Method Summary collapse

Methods inherited from ApplicationController

#access_denied_resource_path, #after_sign_in_path_for, #after_sign_out_path_for, #raise_not_found!, #render_not_found

Instance Method Details

#record_not_foundObject



28
29
30
31
32
# File 'app/controllers/think_feel_do_engine/coach/participant_activities_visualizations_controller.rb', line 28

def record_not_found
  redirect_to main_app.root_path,
              alert: "The activities visualization you were "\
              "looking does not exist."
end

#showObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/think_feel_do_engine/coach/participant_activities_visualizations_controller.rb', line 15

def show
  @participant = Participant.find(params[:participant_id])
  @group = @participant.groups.find(params[:group_id])
  provider = ContentProviders::YourActivitiesProvider.new
  options = RenderOptions.new(
    self,
    @participant.navigation_status,
    @participant.navigation_status.content_position,
    @participant
  )
  provider.render_current(options)
end