Patch #32431
Updated by Go MAEDA about 5 years ago
This "hm:t :issue_custom_values" association has been defined since the "Initial commit" at 6b7650e2f03156ea1e3985b30c1995e44c317e3d, but actually neither an association named :issue_custom_values nor a model named IssueCustomValue have appeared in the history. And so referencing this association of course causes an ActiveRecord error: <pre> ``` $ bundle e rails r 'IssueCustomField.new.issues' Traceback (most recent call last): 16: from bin/rails:4:in `<main>' 15: from bin/rails:4:in `require' 14: from .../railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>' 13: from .../railties-5.2.3/lib/rails/command.rb:46:in `invoke' 12: from .../railties-5.2.3/lib/rails/command/base.rb:65:in `perform' 11: from .../thor-0.20.3/lib/thor.rb:387:in `dispatch' 10: from .../thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 9: from .../thor-0.20.3/lib/thor/command.rb:27:in `run' 8: from .../railties-5.2.3/lib/rails/commands/runner/runner_command.rb:41:in `perform' 7: from .../railties-5.2.3/lib/rails/commands/runner/runner_command.rb:41:in `eval' 6: from .../railties-5.2.3/lib/rails/commands/runner/runner_command.rb:41:in `<main>' 5: from .../activerecord-5.2.3/lib/active_record/associations/builder/association.rb:108:in `issues' 4: from .../activerecord-5.2.3/lib/active_record/associations.rb:237:in `association' 3: from .../activerecord-5.2.3/lib/active_record/associations.rb:237:in `new' 2: from .../activerecord-5.2.3/lib/active_record/associations/has_many_through_association.rb:10:in `initialize' 1: from .../activerecord-5.2.3/lib/active_record/associations/association.rb:26:in `initialize' .../activerecord-5.2.3/lib/active_record/reflection.rb:912:in `check_validity!': Could not find the association :issue_custom_values in model IssueCustomField (ActiveRecord::HasManyThroughAssociationNotFoundError) </pre> ``` The attached patch just removes this dead association.