From bceaa7402d573ce12a9c26d36984c35c20839b60 Mon Sep 17 00:00:00 2001 From: Louis T Date: Thu, 22 Jul 2010 23:06:54 -0400 Subject: [PATCH] Update mustache_rails to user autoload_paths instead of load_paths --- CHANGELOG.rdoc | 1 + .../mustache/install/templates/lib/mustache_rails.rb | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index 071e32d..40eebfb 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -7,6 +7,7 @@ == Master * optimize * Update jquery install by removing unneeded initializer file + * Update mustache_rails to user autoload_paths instead of load_paths == 0.10.3 * optimize diff --git a/lib/generators/mustache/install/templates/lib/mustache_rails.rb b/lib/generators/mustache/install/templates/lib/mustache_rails.rb index c7e906d..05a50c0 100644 --- a/lib/generators/mustache/install/templates/lib/mustache_rails.rb +++ b/lib/generators/mustache/install/templates/lib/mustache_rails.rb @@ -1,5 +1,3 @@ -require 'action_view' -require 'active_support' require 'mustache' class Mustache @@ -119,5 +117,5 @@ def mustache_template_file(template) end end -::ActiveSupport::Dependencies.load_paths << Rails.root.join("app", "views") +::ActiveSupport::Dependencies.autoload_paths += [Rails.root.join('app', 'views')] ::ActionView::Template.register_template_handler(:rb, Mustache::Rails::TemplateHandler)