Module: DataControllerConfiguration::ProjectDataControllerConfiguration

Extended by:
ActiveSupport::Concern
Included in:
AlternateValuesController, AssertedDistributionsController, BiocurationClassificationsController, BiologicalAssociationsController, BiologicalAssociationsGraphsController, BiologicalRelationshipsController, CharacterStatesController, CitationTopicsController, CitationsController, CollectingEventsController, CollectionObjectObservationsController, CollectionObjectsController, CollectionProfilesController, CombinationsController, CommonNamesController, ConfidenceLevelsController, ConfidencesController, ContainerItemsController, ContainersController, ContentsController, ControlledVocabularyTermsController, DataAttributesController, DepictionsController, DescriptorsController, DocumentationController, DocumentsController, ExtractsController, GeneAttributesController, Georeferences::GeoLocatesController, Georeferences::GoogleMapsController, GeoreferencesController, IdentifiersController, ImagesController, KeywordsController, LanguagesController, LoanItemsController, LoansController, NotesController, ObservationMatricesController, ObservationMatrixColumnItemsController, ObservationMatrixColumnsController, ObservationMatrixRowItemsController, ObservationMatrixRowsController, ObservationsController, OriginRelationshipsController, OtuPageLayoutSectionsController, OtuPageLayoutsController, OtusController, PredicatesController, ProjectSourcesController, ProtocolRelationshipsController, ProtocolsController, PublicContentsController, RangedLotCategoriesController, SequenceRelationshipsController, SequencesController, TaggedSectionKeywordsController, TagsController, 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

- (Arel::Nodes, :unprocessable_entity) annotator_params(params, klass)

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



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

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