Class: Tasks::DataAttributes::DuplicateDataAttributesController

Inherits:
ApplicationController
  • Object
show all
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

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#dataObject

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

#indexObject



7
8
# File 'app/controllers/tasks/data_attributes/duplicate_data_attributes_controller.rb', line 7

def index
end