app/models/trade/taxon_concept_source_validation_rule.rb
Method matching_records_arel
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def matching_records_arel(table_name)
s = Arel::Table.new("#{table_name}_view")
tc = Arel::Table.new('taxon_concepts')
t = Arel::Table.new('taxonomies')
Consider simplifying this complex logical expression. Open
Open
return nil unless shipment.source && (
shipment.taxon_concept &&
shipment.taxon_concept.data['kingdom_name'] == 'Animalia' &&
INVALID_KINGDOM_SOURCE['ANIMALIA'].include?(shipment.source.code) ||
shipment.taxon_concept &&