Sha256: ea1f0243b2db714d185b4d479cdffad3bc2d5b3fafcc07f7fcd03c8f691aea54
Contents?: true
Size: 826 Bytes
Versions: 4
Compression:
Stored size: 826 Bytes
Contents
ActionView::LookupContext.register_detail(:feature) {[]} #-> add the details to the options hash module ActionView class PathSet def find(*args) templates = find_all(*args) if templates.empty? if find_all_inactive(*args).empty? raise(MissingTemplate.new(self, *args)) else ActionView::Template::Text.new("","text") end else templates.first || raise(MissingTemplate.new(self, *args)) end end private def find_all_inactive(path, prefixes = [], *args) prefixes = [prefixes] if String === prefixes prefixes.each do |prefix| templates = paths.find{|p| p.is_a?PhenomenalRails::Resolver}.find_all_inactive(path, prefix, *args) return templates unless templates.empty? end [] end end end
Version data entries
4 entries across 4 versions & 1 rubygems