module RenderPartialWithPrefixes::MonkeyPatch

Public Class Methods

included(base) click to toggle source
# File lib/render_partial_with_prefixes/monkeypatch.rb, line 4
def self.included(base)
  base.class_eval do
    alias_method_chain :find_template, :prefixes
  end
end

Public Instance Methods

find_template_with_prefixes(path, locals) click to toggle source
# File lib/render_partial_with_prefixes/monkeypatch.rb, line 10
def find_template_with_prefixes(path, locals)
  prefixes = path.include?(?/) ? [] : (@options[:prefixes] || @lookup_context.prefixes)
  @lookup_context.find_template(path, prefixes, true, locals, @details)
end