Sha256: 5d667ac4aa2404762764fbc009f84ced9a6c9e2438ad98d1f4ee51599725f4c9

Contents?: true

Size: 327 Bytes

Versions: 1

Compression:

Stored size: 327 Bytes

Contents

module Irwi::Support::TemplateFinder

  def template_dir(template)
    dir = respond_to?( :controller_path ) ? controller_path : controller.controller_path
    dir = 'base_wiki_pages' if Dir.glob( "app/views/#{dir}/#{template}.html.*" ).empty? # Select default if there are no template in resource directory
    dir
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
irwi-0.5.0 lib/irwi/support/template_finder.rb