Class: ViewComponent::FragmentCaching::Resolvers::ViewComponentResolver

Inherits:
ActionView::FileSystemResolver
  • Object
show all
Defined in:
lib/view_component/fragment_caching/resolvers/view_component_resolver.rb

Constant Summary collapse

VIEW_COMPONENT_RUBY_HANDLER =
:vc_rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ ViewComponentResolver

Returns a new instance of ViewComponentResolver.



96
97
98
99
# File 'lib/view_component/fragment_caching/resolvers/view_component_resolver.rb', line 96

def initialize(path)
  super
  override_path_parser
end

Instance Method Details

#clear_cacheObject



101
102
103
104
# File 'lib/view_component/fragment_caching/resolvers/view_component_resolver.rb', line 101

def clear_cache
  super
  override_path_parser
end

#find_all(*args) ⇒ Object

def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/view_component/fragment_caching/resolvers/view_component_resolver.rb', line 107

def find_all(*args)
  name      = args.fetch 0
  prefix    = args.fetch 1, nil
  partial   = false
  details   = args.fetch 3, {}
  given_key = args.fetch 4, nil
  locals    = args.fetch 5, []

  key = build_key given_key, details
  super name, prefix, partial, details, key, locals
end