module Roda::RodaPlugins::AdditionalViewDirectories::InstanceMethods
Private Instance Methods
Source
# File lib/roda/plugins/additional_view_directories.rb, line 49 def template_path(opts) orig_path = super unless File.file?(orig_path) self.opts[:additional_view_directories].each do |view_dir| path = super(opts.merge(:views=>view_dir)) return path if File.file?(path) end end orig_path end
If the template path does not exist, try looking for the template in each of the additional view directories, in order, returning the first path that exists. If no additional directory includes the template, return the original path.
Calls superclass method