{"record":{"id":"e612a8554493de80","repo":"thoughtbot/shoulda-matchers","slug":"deprecated-association-matcher-is-only-available","errorCode":null,"errorMessage":"`deprecated` association matcher is only available on Active Record >= 8.1.","messagePattern":"`deprecated` association matcher is only available on Active Record >= 8\\.1\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"lib/shoulda/matchers/active_record/association_matcher.rb","lineNumber":1650,"sourceCode":"          self\n        end\n\n        def strict_loading(strict_loading = true)\n          @options[:strict_loading] = strict_loading\n          self\n        end\n\n        def join_table(join_table_name)\n          @options[:join_table_name] = join_table_name\n          self\n        end\n\n        def deprecated(deprecated = true)\n          if Shoulda::Matchers::RailsShim.active_record_gte_8_1?\n            @options[:deprecated] = deprecated\n            self\n          else\n            raise NotImplementedError,\n              '`deprecated` association matcher is only available on Active Record >= 8.1.'\n          end\n        end\n\n        def without_validating_presence\n          remove_submatcher(AssociationMatchers::RequiredMatcher)\n          self\n        end\n\n        def description\n          description = \"#{macro_description} #{name}\"\n          if options.key?(:class_name)\n            description += \" class_name => #{options[:class_name]}\"\n          end\n          [description, submatchers.map(&:description)].flatten.join(' ')\n        end\n\n        def failure_message","sourceCodeStart":1632,"sourceCodeEnd":1668,"githubUrl":"https://github.com/thoughtbot/shoulda-matchers/blob/79cdfbc326e97c9b43991b644434ca53c1f62c4c/lib/shoulda/matchers/active_record/association_matcher.rb#L1632-L1668","documentation":"Error \"`deprecated` association matcher is only available on Active Record >= 8.1.\" thrown in thoughtbot/shoulda-matchers.","triggerScenarios":"Thrown at lib/shoulda/matchers/active_record/association_matcher.rb:1650 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"79cdfbc326e97c9b43991b644434ca53c1f62c4c","analyzedAt":"2026-08-23T09:43:24.200Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}