Sha256: a5c92b344001a69378fe3225efe8b1da5c6907a5d073604d904f0325729b19af

Contents?: true

Size: 340 Bytes

Versions: 3

Compression:

Stored size: 340 Bytes

Contents

module Irwi::Support::TemplateFinder

  protected

  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

3 entries across 3 versions & 1 rubygems

Version Path
irwi-0.4.2 lib/irwi/support/template_finder.rb
irwi-0.4.1 lib/irwi/support/template_finder.rb
irwi-0.4.0 lib/irwi/support/template_finder.rb