Sha256: 323c9780dd2cabcdc37b708208906058b8a0e7eb08040ec97da68493b29c8831

Contents?: true

Size: 627 Bytes

Versions: 11

Compression:

Stored size: 627 Bytes

Contents

module Admin
  class MentorshipGroupsController < ApplicationController
    before_action(:authenticate_user!) if defined?(Devise)
    before_action { EffectiveResources.authorize!(self, :admin, :effective_mentorships) }

    include Effective::CrudController

    resource_scope -> { EffectiveMentorships.MentorshipGroup.deep.all }
    datatable -> { EffectiveResources.best('Admin::EffectiveMentorshipGroupsDatatable').new }

    private

    def permitted_params
      model = (params.key?(:effective_mentorship_group) ? :effective_mentorship_group : :mentorship_group)
      params.require(model).permit!
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
effective_mentorships-0.3.4 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.3.3 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.3.2 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.3.1 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.3.0 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.2.4 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.2.3 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.2.2 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.2.1 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.2.0 app/controllers/admin/mentorship_groups_controller.rb
effective_mentorships-0.1.0 app/controllers/admin/mentorship_groups_controller.rb