Class: Tasks::DataAttributes::DuplicateDataAttributesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::DataAttributes::DuplicateDataAttributesController
- Includes:
- TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/data_attributes/duplicate_data_attributes_controller.rb
Overview
Controller for the Duplicate Data Attributes report task. Identifies objects that have more than one DataAttribute with the same Predicate. Claude provided > 50% of the code for this class.
Instance Method Summary collapse
-
#data ⇒ Object
Returns JSON data of objects with duplicate predicates.
- #index ⇒ Object
Methods included from TaskControllerConfiguration
Instance Method Details
#data ⇒ Object
Returns JSON data of objects with duplicate predicates. Accepts filter query parameters (e.g., otu_query, collection_object_query).
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/tasks/data_attributes/duplicate_data_attributes_controller.rb', line 12 def data filter = Queries::Query::Filter.instantiated_base_filter(params) if filter.nil? || filter.params.empty? render json: { error: 'No valid filter query provided' }, status: :unprocessable_content return end result = helpers.duplicate_predicate_data(filter, sessions_current_project_id) render json: result end |
#index ⇒ Object
7 8 |
# File 'app/controllers/tasks/data_attributes/duplicate_data_attributes_controller.rb', line 7 def index end |