module Roda::RodaPlugins::Render::InstanceMethods

def template_path(opts)

The template path for the given options.
def template_path(opts)
  path = "#{opts[:views]}/#{template_name(opts)}.#{opts[:engine]}"
  if opts.fetch(:check_paths){render_opts[:check_paths]}
    full_path = self.class.expand_path(path)
    unless render_opts[:allowed_paths].any?{|f| full_path.start_with?(f)}
      raise RodaError, "attempt to render path not in allowed_paths: #{full_path} (allowed: #{render_opts[:allowed_paths].join(', ')})"
    end
  end
  path
end