Sha256: ebe4cd9972d9f62953e54b7fb33e477754d6df2df5b221951c4a1d68e4ed3a3b
Contents?: true
Size: 671 Bytes
Versions: 9
Compression:
Stored size: 671 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 -> { EffectiveResources.best('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
9 entries across 9 versions & 1 rubygems