File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -316,6 +316,12 @@ def view_cache_dependencies
316316 [ ]
317317 end
318318
319+ # Rails expects us to define `format` on all renderables,
320+ # but we do not know the `format` of a ViewComponent until runtime.
321+ def format
322+ nil
323+ end
324+
319325 # The current request. Use sparingly as doing so introduces coupling that
320326 # inhibits encapsulation & reuse, often making testing difficult.
321327 #
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ def each(&block)
1919 components . each ( &block )
2020 end
2121
22+ # Rails expects us to define `format` on all renderables,
23+ # but we do not know the `format` of a ViewComponent until runtime.
24+ def format
25+ nil
26+ end
27+
2228 private
2329
2430 def components
You can’t perform that action at this time.
0 commit comments