Sha256: ba7c3a7780a5889376751de1e9f0dfbb48f002382e3dde831e3a83c41036edae

Contents?: true

Size: 345 Bytes

Versions: 17

Compression:

Stored size: 345 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

17 entries across 17 versions & 1 rubygems

Version Path
irwi-0.2.4 lib/irwi/support/template_finder.rb
irwi-0.2.3 lib/irwi/support/template_finder.rb
irwi-0.2.2 lib/irwi/support/template_finder.rb
irwi-0.2.1 lib/irwi/support/template_finder.rb
irwi-0.2.0 lib/irwi/support/template_finder.rb
irwi-0.1.11 lib/irwi/support/template_finder.rb
irwi-0.1.10 lib/irwi/support/template_finder.rb
irwi-0.1.9 lib/irwi/support/template_finder.rb
irwi-0.1.7 lib/irwi/support/template_finder.rb
irwi-0.1.6 lib/irwi/support/template_finder.rb
irwi-0.1.5 lib/irwi/support/template_finder.rb
irwi-0.1.4 lib/irwi/support/template_finder.rb
irwi-0.1.3 lib/irwi/support/template_finder.rb
irwi-0.1.2 lib/irwi/support/template_finder.rb
irwi-0.1.1 lib/irwi/support/template_finder.rb
irwi-0.1.0 lib/irwi/support/template_finder.rb
irwi-0.0.0 lib/irwi/support/template_finder.rb