SpeciesFileGroup/taxonworks

View on GitHub
app/models/loan_item.rb

Summary

Maintainability
A
0 mins
Test Coverage

TODO found
Open

  # TODO: this does not factor in nested items in a container
Severity: Minor
Found in app/models/loan_item.rb by fixme

TODO found
Open

  # TODO: param handling is currently all kinds of "meh"
Severity: Minor
Found in app/models/loan_item.rb by fixme

unexpected token $end (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tASSOC (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

      rescue ActiveRecord::RecordInvalid => e
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token kDO_BLOCK (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          Tag.where(keyword_id:).where(tag_object_type: ['Container', 'Otu', 'CollectionObject']).distinct.all.each do |o|
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            created.push LoanItem.create!(loan_item_object: o.pinned_object, loan_id:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            created.push LoanItem.create!(loan_item_object: o, loan_id:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          PinboardItem.where(project_id:, user_id:, pinned_object_type: ['Container', 'Otu', 'CollectionObject']).all.each do |o|
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            created.push LoanItem.create!(loan_item_object: o.tag_object, loan_id:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          klass.constantize.joins(:pinboard_items).where(pinboard_items: {user_id:, project_id:, pinned_object_type: klass}).each do |o|
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            created.push LoanItem.create!(loan_item_object: o, loan_id:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

        update!(date_returned:, disposition:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCONSTANT (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

            created.push LoanItem.create!(loan_item_object: o.tag_object, loan_id:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    return { moved:, unmoved: }
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

    return {returned:, unreturned:}
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          project_id:,
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRCURLY (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          klass.constantize.joins(:tags).where(tags: {keyword_id:}).each do |o|
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tRPAREN (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          Tag.where(keyword_id:).where(tag_object_type: ['Container', 'Otu', 'CollectionObject']).distinct.all.each do |o|
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          i = LoanItem.create!(loan_item_object: co, by: user_id, loan_id:, project_id:)
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

unexpected token tCOMMA (Using Ruby 2.4 parser; configure using TargetRubyVersion parameter, under AllCops)
Open

          PinboardItem.where(project_id:, user_id:, pinned_object_type: ['Container', 'Otu', 'CollectionObject']).all.each do |o|
Severity: Minor
Found in app/models/loan_item.rb by rubocop

This is not actually a cop. It does not inspect anything. It just provides methods to repack Parser's diagnostics/errors into RuboCop's offenses.

There are no issues that match your filters.

Category
Status