Sha256: 9f5e68e4907ce9728aeddd414603b580668ece505c48d376d319039642bf3b47

Contents?: true

Size: 390 Bytes

Versions: 6

Compression:

Stored size: 390 Bytes

Contents

module Htmltoword
  module TemplatesHelper
    def template_file(template_file_name = nil)
      default_path = File.join(::Htmltoword.config.default_templates_path, 'default.docx')
      template_path = template_file_name.nil? ? '' : File.join(::Htmltoword.config.custom_templates_path, template_file_name)
      File.exist?(template_path) ? template_path : default_path
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
htmltoword-1.1.1 lib/htmltoword/helpers/templates_helper.rb
janie-htmltoword-1.1.2 lib/htmltoword/helpers/templates_helper.rb
htmltoword-1.1.0 lib/htmltoword/helpers/templates_helper.rb
htmltoword-1.0.0 lib/htmltoword/helpers/templates_helper.rb
htmltoword-0.7.0 lib/htmltoword/helpers/templates_helper.rb
mitimes-htmltoword-0.1.0 lib/htmltoword/helpers/templates_helper.rb