Class: ThinkFeelDoEngine::Participants::ActivitiesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ThinkFeelDoEngine::Participants::ActivitiesController
- Defined in:
- app/controllers/think_feel_do_engine/participants/activities_controller.rb
Overview
Manage Participant Activities.
Constant Summary
Constants inherited from ApplicationController
ApplicationController::CSRF_COOKIE_NAME, ApplicationController::CSRF_HEADER_NAME, ApplicationController::INACTIVE_MESSAGE, ApplicationController::ROOT_URI
Instance Method Summary collapse
-
#create ⇒ Object
refactor…
-
#update ⇒ Object
…
Methods inherited from ApplicationController
#access_denied_resource_path, #after_sign_in_path_for, #after_sign_out_path_for
Instance Method Details
#create ⇒ Object
refactor…
11 12 13 14 |
# File 'app/controllers/think_feel_do_engine/participants/activities_controller.rb', line 11 def create @activity = current_participant.activities.find(activity_id) @activity.update(activity_params) end |
#update ⇒ Object
…
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/think_feel_do_engine/participants/activities_controller.rb', line 17 def update if @activity.update_as_reviewed(activity_params_for_update) flash[:notice] = "Activity updated." respond_to do |format| format.js { render inline: "Turbolinks.visit(window.location);" } end else flash[:alert] = @activity.errors..join(", ") respond_to do |format| format.js { render inline: "Turbolinks.visit(window.location);" } end end end |