module RailsCom::ActionView::PartialRenderer

Public Instance Methods

find_template(path, locals) click to toggle source

支持在views/:controller 目录下,用 _:action 开头的子目录进一步分组

# File lib/rails_com/action_view/partial_renderer.rb, line 7
def find_template(path, locals)
  if path.include?('/') && !path.start_with?('_')
    prefixes = []
  else
    prefixes = @lookup_context.prefixes
  end

  @lookup_context.find_template(path, prefixes, true, locals, @details)
end