module Avv2word::TemplatesHelper
Public Instance Methods
template_file(template_file_name = nil)
click to toggle source
# File lib/avv2word/helpers/templates_helper.rb, line 3 def template_file(template_file_name = nil) default_path = File.join(::Avv2word.config.default_templates_path, 'default.docx') template_path = template_file_name.nil? ? '' : File.join(::Avv2word.config.custom_templates_path, template_file_name) File.exist?(template_path) ? template_path : default_path end