Module: Mustache::Rails::Config

Defined in:
lib/mustache_rails.rb

Overview

You can change these defaults in, say, a Rails initializer or environment.rb, e.g.:

Mustache::Rails::Config.template_base_path = Rails.root.join(‘app’, ‘templates’)

Class Method Summary collapse

Class Method Details

.shared_pathObject



58
59
60
# File 'lib/mustache_rails.rb', line 58

def self.shared_path
  @shared_path ||= ::Rails.root.join('app', 'templates', 'shared')
end

.shared_path=(value) ⇒ Object



62
63
64
# File 'lib/mustache_rails.rb', line 62

def self.shared_path=(value)
  @shared_path = value
end

.template_base_pathObject



42
43
44
# File 'lib/mustache_rails.rb', line 42

def self.template_base_path
  @template_base_path ||= ::Rails.root.join('app', 'templates')
end

.template_base_path=(value) ⇒ Object



46
47
48
# File 'lib/mustache_rails.rb', line 46

def self.template_base_path=(value)
  @template_base_path = value
end

.template_extensionObject



50
51
52
# File 'lib/mustache_rails.rb', line 50

def self.template_extension
  @template_extension ||= 'html.mustache'
end

.template_extension=(value) ⇒ Object



54
55
56
# File 'lib/mustache_rails.rb', line 54

def self.template_extension=(value)
  @template_extension = value
end