Sha256: a465e81a79d88d38e10776da79f941be082d6c53f9219eff204e82a95f72ce69

Contents?: true

Size: 661 Bytes

Versions: 12

Compression:

Stored size: 661 Bytes

Contents

require_dependency "think_feel_do_dashboard/application_controller"

module ThinkFeelDoDashboard
  # Allows Coaches/Clinicians to moderate.
  # That is, log in as a participant
  class ModeratorsController < ApplicationController
    before_action :set_group

    # POST /coach/groups/:group_id/moderates
    def create
      authorize! :moderate, @group
      sign_in @group.moderating_participant
      redirect_to social_networking.social_networking_profile_path
    end

    private

    def set_group
      @group = Group.find(params[:group_id])

    rescue ActiveRecord::RecordNotFound => e
      redirect_to root_path, alert: e.message
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
think_feel_do_dashboard-1.2.0.beta1 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.21 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.20 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.19 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.18 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.17 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.16 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.15 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.14 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.13 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.12 app/controllers/think_feel_do_dashboard/moderators_controller.rb
think_feel_do_dashboard-1.1.11 app/controllers/think_feel_do_dashboard/moderators_controller.rb