Sha256: 467691b35754ec5427eb7e8aaff2cdd312ddfe05dfebf451b9dee0ec41e9bb83

Contents?: true

Size: 670 Bytes

Versions: 3

Compression:

Stored size: 670 Bytes

Contents

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

    include Effective::CrudController

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

    private

    def permitted_params
      model = (params.key?(:effective_mentorship_registration) ? :effective_mentorship_registration : :mentorship_registration)
      params.require(model).permit!
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_mentorships-0.2.1 app/controllers/admin/mentorship_registrations_controller.rb
effective_mentorships-0.2.0 app/controllers/admin/mentorship_registrations_controller.rb
effective_mentorships-0.1.0 app/controllers/admin/mentorship_registrations_controller.rb