Sha256: ce84fdad0255fc7be75996a9e1454d95eaf317e11a2d0c990d248d66796eea04

Contents?: true

Size: 644 Bytes

Versions: 10

Compression:

Stored size: 644 Bytes

Contents

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

    include Effective::CrudController

    resource_scope -> { EffectiveCpd.CpdStatement.deep.all }
    datatable -> { Admin::EffectiveCpdStatementsDatatable.new }

    page_title(only: :index) { "#{EffectiveCpd.program_label} Statements" }

    private

    def permitted_params
      model = (params.key?(:effective_cpd_statement) ? :effective_cpd_statement : :cpd_statement)
      params.require(model).permit!
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
effective_cpd-0.6.9 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-1.0.0 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.8 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.7 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.6 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.5 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.4 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.3 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.2 app/controllers/admin/cpd_statements_controller.rb
effective_cpd-0.6.1 app/controllers/admin/cpd_statements_controller.rb