{"record":{"id":"395b69a0154d2908","repo":"ViewComponent/view_component","slug":"no-content-provided-to-with-content-for-self","errorCode":null,"errorMessage":"No content provided to `#with_content` for #{self}.\n\nTo fix this issue, pass a value.","messagePattern":"No content provided to `#with_content` for #(.+?)\\.\n\nTo fix this issue, pass a value\\.","errorType":"exception","errorClass":"ViewComponent::NilWithContentError","httpStatus":null,"severity":"error","filePath":"lib/view_component/with_content_helper.rb","lineNumber":6,"sourceCode":"# frozen_string_literal: true\n\nmodule ViewComponent\n  module WithContentHelper\n    def with_content(value)\n      raise NilWithContentError if value.nil?\n\n      @__vc_content_set_by_with_content = value\n\n      self\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":14,"githubUrl":"https://github.com/ViewComponent/view_component/blob/9f22c36fa7d7b44098a8ed97472e3b4674ae420f/lib/view_component/with_content_helper.rb#L1-L14","documentation":"Error \"No content provided to `#with_content` for #{self}.\n\nTo fix this issue, pass a value.\" thrown in ViewComponent/view_component.","triggerScenarios":"Thrown at lib/view_component/with_content_helper.rb:6 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-nil value to `with_content`, e.g. component.with_content('Some content').","If you intended to supply content via a block, drop `with_content` and render with a block instead."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9f22c36fa7d7b44098a8ed97472e3b4674ae420f","analyzedAt":"2026-08-23T10:20:47.008Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}