SpeciesFileGroup/taxonworks

View on GitHub
app/models/tag/matrix_hooks.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use find_each instead of each.
Open

      ObservationMatrixRowItem::Dynamic::Tag.where(observation_object_type: 'ControlledVocabularyTerm', observation_object_id:  keyword_id).each do |mri|
Severity: Minor
Found in app/models/tag/matrix_hooks.rb by rubocop

This cop is used to identify usages of all.each and change them to use all.find_each instead.

Example:

# bad
User.all.each

# good
User.all.find_each

Use find_each instead of each.
Open

      ObservationMatrixColumnItem::Dynamic::Tag.where(controlled_vocabulary_term_id: keyword_id).each do |mci|
Severity: Minor
Found in app/models/tag/matrix_hooks.rb by rubocop

This cop is used to identify usages of all.each and change them to use all.find_each instead.

Example:

# bad
User.all.each

# good
User.all.find_each

Use find_each instead of each.
Open

    ObservationMatrixRowItem::Dynamic::Tag.where(observation_object_type: 'ControlledVocabularyTerm', observation_object_id: keyword_id).each do |mri|
Severity: Minor
Found in app/models/tag/matrix_hooks.rb by rubocop

This cop is used to identify usages of all.each and change them to use all.find_each instead.

Example:

# bad
User.all.each

# good
User.all.find_each

There are no issues that match your filters.

Category
Status