Exception: ViewComponent::DuplicateContentError
- Inherits:
-
StandardError
- Object
- StandardError
- ViewComponent::DuplicateContentError
- Defined in:
- lib/view_component/errors.rb
Constant Summary collapse
- MESSAGE =
"It looks like a block was provided after calling `with_content` on COMPONENT, " \ "which means that ViewComponent doesn't know which content to use.\n\n" \ "To fix this issue, use either `with_content` or a block."
Instance Method Summary collapse
-
#initialize(klass_name) ⇒ DuplicateContentError
constructor
A new instance of DuplicateContentError.
Constructor Details
#initialize(klass_name) ⇒ DuplicateContentError
Returns a new instance of DuplicateContentError.
47 48 49 |
# File 'lib/view_component/errors.rb', line 47 def initialize(klass_name) super(MESSAGE.gsub("COMPONENT", klass_name.to_s)) end |