require 'shared_mustache/view_helpers'

module SharedMustache
  class Railtie < Rails::Railtie
    initializer "shared_mustache.view_helpers" do
      ActionView::Base.send :include, ViewHelpers
    end
    rake_tasks do
      Dir[File.expand_path('../tasks/*.rake', File.dirname(__FILE__))].each { |f| load f }
    end
  end
end

require 'shared_mustache/view_helpers'

module SharedMustache
  class Railtie < Rails::Railtie
    initializer "shared_mustache.view_helpers" do
      ActionView::Base.send :include, ViewHelpers
    end
    initializer "shared_mustache.assets.precompile" do |app|
      app.config.assets.precompile += %w(
        hogan-2.0.0-hotfix.js
      )
    end
    rake_tasks do
      Dir[File.expand_path('../tasks/*.rake', File.dirname(__FILE__))].each { |f| load f }
    end
  end
end

Add initializer to add hogan to precompile
Add initializer to add hogan to precompile

Using `render_mustache_templates` will add our hogan.js to the app via a
script tag.  In newer versions of rails using newer versions of
sprockets-rails we must add the hogan.js to assets.precompile or rails
will complain and not load it.
