Sha256: 6095b0a69198072f398a812f4ac0e9945fceae813a45f12cb3d717d436d4ccb4
Contents?: true
Size: 733 Bytes
Versions: 2
Compression:
Stored size: 733 Bytes
Contents
module Stache # Change these defaults in, say, an initializer. # # Stache.template_base_path = Rails.root.join('app', 'templates') # # Or with the block syntax: # # Stache.configure do |config| # config.template_base_path = Rails.root.join('app', 'views', 'shared') # end module Config attr_accessor :template_base_path, :template_extension, :shared_path def configure yield self end def template_base_path @template_base_path ||= ::Rails.root.join('app', 'templates') end def template_extension @template_extension ||= 'html.mustache' end def shared_path @shared_path ||= ::Rails.root.join('app', 'templates', 'shared') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stache-0.0.2 | lib/stache/config.rb |
stache-0.0.1 | lib/stache/config.rb |