Class: ThinkFeelDoEngine::Manage::GroupsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/think_feel_do_engine/manage/groups_controller.rb

Overview

Users can view groups to CRUD and assign slideshows

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

#edit_tasksObject



16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/think_feel_do_engine/manage/groups_controller.rb', line 16

def edit_tasks
  @group = @arm.groups
               .includes(tasks: { bit_core_content_module: :tool })
               .find(params[:id])
  authorize! :update, @group
  @task = current_user.tasks.build
  @content_modules = BitCore::ContentModule
                     .where(bit_core_tool_id: @arm.bit_core_tool_ids)
                     .includes(:tool)
end

#indexObject



11
12
13
14
# File 'app/controllers/think_feel_do_engine/manage/groups_controller.rb', line 11

def index
  authorize! :index, Group
  @groups = Group.all
end