123456789_123456789_123456789_123456789_123456789_

Class: ActionView::Resolver

Relationships & Source Files
Namespace Children
Classes:
Extension / Inclusion / Inheritance Descendants
Subclasses:
ActionView::FallbackFileSystemResolver, FileSystemResolver, FixtureResolver, NullResolver, ActionView::OptimizedFileSystemResolver, ActionView::PathResolver
Inherits: Object
Defined in: actionview/lib/action_view/template/resolver.rb

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.newResolver

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 142

def initialize
  @cache = Cache.new
end

Class Attribute Details

.caching? (rw)

Alias for .caching.

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 139

alias :caching? :caching

Class Method Details

.caching (rw) Also known as: #caching, .caching?

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 136

cattr_accessor :caching, default: true

Instance Attribute Details

#caching (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 136

cattr_accessor :caching, default: true

Instance Method Details

#caching?Boolean (rw)

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 168

delegate :caching?, to: :class

#clear_cache

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 146

def clear_cache
  @cache.clear
end

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

Normalizes the arguments and passes it on to find_templates.

[ GitHub ]

  
# File 'actionview/lib/action_view/template/resolver.rb', line 151

def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
  locals = locals.map(&:to_s).sort!.freeze

  cached(key, [name, prefix, partial], details, locals) do
    _find_all(name, prefix, partial, details, key, locals)
  end
end