Module: Avv2word::TemplatesHelper
- Included in:
- Document
- Defined in:
- lib/avv2word/helpers/templates_helper.rb
Instance Method Summary collapse
Instance Method Details
#template_file(template_file_name = nil) ⇒ Object
3 4 5 6 7 |
# 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 |