Module: DataControllerConfiguration::ProjectDataControllerConfiguration

Extended by:
ActiveSupport::Concern
Included in:
AlternateValuesController, AssertedDistributionsController, AttributionsController, BiocurationClassificationsController, BiologicalAssociationsController, BiologicalAssociationsGraphsController, BiologicalRelationshipsController, CachedMapsController, CharacterStatesController, CitationTopicsController, CitationsController, CollectingEventsController, CollectionObjectObservationsController, CollectionObjectsController, CollectionProfilesController, CombinationsController, CommonNamesController, ConfidenceLevelsController, ConfidencesController, ContainerItemsController, ContainersController, ContentsController, ControlledVocabularyTermsController, DataAttributesController, DatasetRecordsController, DepictionsController, DescriptorsController, DocumentationController, DocumentsController, DownloadsController, DwcOccurrencesController, ExtractsController, FieldOccurrencesController, GeneAttributesController, Georeferences::GeoLocatesController, GeoreferencesController, IdentifiersController, ImagesController, ImportDatasetsController, KeywordsController, LabelsController, LanguagesController, LeadsController, LoanItemsController, LoansController, NotesController, ObservationMatricesController, ObservationMatrixColumnItemsController, ObservationMatrixColumnsController, ObservationMatrixRowItemsController, ObservationMatrixRowsController, ObservationsController, OriginRelationshipsController, OtuPageLayoutSectionsController, OtuPageLayoutsController, OtuRelationshipsController, OtusController, PredicatesController, ProjectSourcesController, ProtocolRelationshipsController, ProtocolsController, PublicContentsController, RangedLotCategoriesController, RolesController, SequenceRelationshipsController, SequencesController, SoftValidationsController, SqedDepictionsController, TaggedSectionKeywordsController, TagsController, Tasks::Accessions::Report::WorkController, TaxonDeterminationsController, TaxonNameClassificationsController, TaxonNameRelationshipsController, TaxonNamesController, TopicsController, TypeMaterialsController
Defined in:
app/controllers/concerns/data_controller_configuration/project_data_controller_configuration.rb

Instance Method Summary collapse

Instance Method Details

#annotator_params(params, klass) ⇒ Arel::Nodes, :unprocessable_entity

Returns wrap the the params gathering, if no valid params are provided return as unprocessable.

Returns:

  • (Arel::Nodes, :unprocessable_entity)

    wrap the the params gathering, if no valid params are provided return as unprocessable



12
13
14
15
16
17
18
19
20
21
22
# File 'app/controllers/concerns/data_controller_configuration/project_data_controller_configuration.rb', line 12

def annotator_params(params, klass)
  w = Queries::Annotator.annotator_params(params, klass)
  if w.nil?
    respond_to do |format|
      format.html { render plain: '404 Not Found', status: :unprocessable_entity and return }
      format.json { render json: {success: false}, status: :unprocessable_entity and return }
    end
  else
    w
  end
end