Sha256: 20edf9bd8aae404b2e7ffd2785c6edb42b7e8f9677b7afeda70af70289078601

Contents?: true

Size: 797 Bytes

Versions: 4

Compression:

Stored size: 797 Bytes

Contents

module ThinkFeelDoEngine
  module Manage
    # Users can view groups to CRUD and assign slideshows
    class GroupsController < ApplicationController
      before_action :authenticate_user!, :set_arm
      load_and_authorize_resource except: :edit_tasks

      def index
      end

      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

      private

      def set_arm
        @arm = Arm.find(params[:arm_id])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
think_feel_do_engine-3.10.9 app/controllers/think_feel_do_engine/manage/groups_controller.rb
think_feel_do_engine-3.10.8 app/controllers/think_feel_do_engine/manage/groups_controller.rb
think_feel_do_engine-3.10.7 app/controllers/think_feel_do_engine/manage/groups_controller.rb
think_feel_do_engine-3.10.6 app/controllers/think_feel_do_engine/manage/groups_controller.rb