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, #raise_not_found!, #render_not_found
Instance Method Details
#create ⇒ Object
refactor…
12 13 14 15 |
# File 'app/controllers/think_feel_do_engine/participants/activities_controller.rb', line 12 def create @activity = current_participant.activities.find(activity_id) @activity.update(activity_params) end |
#update ⇒ Object
…
18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/think_feel_do_engine/participants/activities_controller.rb', line 18 def update if @activity.update_as_reviewed(activity_params_for_update) flash[:notice] = "Activity updated." else flash[:alert] = @activity.errors..join(", ") end respond_to do |format| format.js { render inline: "Turbolinks.visit(window.location);" } end end |