Module: Whitelist

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/whitelist.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) whitelist_constantize(klass_name)

Parameters:

  • klass_name (String)

    a model name inheriting from IsData



5
6
7
8
9
10
11
12
13
# File 'app/controllers/concerns/whitelist.rb', line 5

def whitelist_constantize(klass_name)
  # if Rails.env.development?
  #   ApplicationEnumeration.data_models.inject({}){|hsh, k| hsh.merge!(k.name => k)}.fetch(klass_name)
  # elsif Rails.env.production?
    ::DATA_MODELS.fetch(klass_name)
  # else
  #   raise TaxonWorks::Error, 'whitelist attempted in unknown environment'
  # end
end