We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de55254 commit e1825c5Copy full SHA for e1825c5
2 files changed
lib/view_component/base.rb
@@ -316,6 +316,12 @@ def view_cache_dependencies
316
[]
317
end
318
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
+
325
# The current request. Use sparingly as doing so introduces coupling that
326
# inhibits encapsulation & reuse, often making testing difficult.
327
#
lib/view_component/collection.rb
@@ -19,6 +19,12 @@ def each(&block)
19
components.each(&block)
20
21
22
23
24
25
26
27
28
private
29
30
def components
0 commit comments