Module: Whitelist
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationController
- Defined in:
- app/controllers/concerns/whitelist.rb
Instance Method Summary collapse
Instance Method Details
#whitelist_constantize(klass_name) ⇒ Object
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.merge('DwcOccurrence' => DwcOccurrence)).fetch(klass_name) # else # raise TaxonWorks::Error, 'whitelist attempted in unknown environment' # end end |