@@ -75,7 +75,7 @@ def config
7575 # Config option that strips trailing whitespace in templates before compiling them.
7676
7777 class_attribute :__vc_response_format , instance_accessor : false , instance_predicate : false , default : nil
78- class_attribute :__vc_cache_dependencies , instance_accessor : false , instance_predicate : false , default : [ ]
78+
7979 class_attribute :__vc_strip_trailing_whitespace , instance_accessor : false , instance_predicate : false
8080 self . __vc_strip_trailing_whitespace = false # class_attribute:default doesn't work until Rails 5.2
8181
@@ -318,15 +318,6 @@ def virtual_path
318318 self . class . virtual_path
319319 end
320320
321- # For caching, such as #cache_if
322- #
323- # @private
324- def view_cache_dependencies
325- return unless __vc_cache_dependencies . present? && __vc_cache_dependencies . any?
326-
327- __vc_cache_dependencies . filter_map { |dep | send ( dep ) }
328- end
329-
330321 # For caching, such as #cache_if
331322 #
332323 # @private
@@ -348,15 +339,6 @@ def __vc_request
348339 @__vc_request ||= controller . request if controller . respond_to? ( :request )
349340 end
350341
351- # For caching, such as #cache_if
352- #
353- # @private
354- def view_cache_dependencies
355- return unless __vc_cache_dependencies . present? && __vc_cache_dependencies . any?
356-
357- __vc_cache_dependencies . filter_map { |dep | send ( dep ) }
358- end
359-
360342 # The content passed to the component instance as a block.
361343 #
362344 # @return [String]
@@ -372,7 +354,7 @@ def content
372354 end
373355 end
374356
375- # Whether `content` has been passed to the component.
357+ # Whether f render? `content` has been passed to the component.
376358 #
377359 # @return [Boolean]
378360 def content?
@@ -543,16 +525,6 @@ def sidecar_files(extensions)
543525 ( sidecar_files - [ identifier ] + sidecar_directory_files + nested_component_files ) . uniq
544526 end
545527
546- def cache_on ( *args )
547- __vc_cache_dependencies . push ( *args )
548- end
549-
550- def view_cache_dependencies
551- return unless __vc_cache_dependencies . any?
552-
553- __vc_cache_dependencies . filter_map { |dep | send ( dep ) }
554- end
555-
556528 # Render a component for each element in a collection ([documentation](/guide/collections)):
557529 #
558530 # ```ruby
0 commit comments