Sha256: 68a2ba9b7e2eafcd9933680214a76b5a6d3888c208c00b9b603a31dc9b79b90e
Contents?: true
Size: 774 Bytes
Versions: 3
Compression:
Stored size: 774 Bytes
Contents
require 'sprockets' require 'sprockets/engines' module Handlebarer class Engine < Rails::Engine initializer 'handlebarer.configure_rails_initialization', :before => 'sprockets.environment', :group => :all do |app| next unless app.config.assets.enabled Sprockets.register_engine '.hbs', ::Handlebarer::Template Sprockets.register_engine '.handlebars', ::Handlebarer::Template end initializer 'handlebarer.prepend_views_path', :after => :add_view_paths do |app| next if Handlebarer::configuration.nil? or Handlebarer::configuration.views_path.nil? ActionController::Base.class_eval do before_filter do |controller| prepend_view_path Handlebarer::configuration.views_path end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
handlebarer-0.0.3 | lib/handlebarer/engine.rb |
handlebarer-0.0.2 | lib/handlebarer/engine.rb |
handlebarer-0.0.1 | lib/handlebarer/engine.rb |