From 4f34610918bb66da9e78af5d61571ebd542c09f1 Mon Sep 17 00:00:00 2001 From: Sharagoz Date: Wed, 27 Jul 2011 15:56:56 +0200 Subject: [PATCH] initialize Cells when used as an engine --- lib/locomotive/engine.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/locomotive/engine.rb b/lib/locomotive/engine.rb index 22a9f1a2..8c17b566 100644 --- a/lib/locomotive/engine.rb +++ b/lib/locomotive/engine.rb @@ -24,6 +24,7 @@ require 'jammit-s3' require 'dragonfly' require 'cancan' require 'RMagick' +require 'cells' $:.unshift File.dirname(__FILE__) @@ -32,6 +33,10 @@ module Locomotive config.autoload_once_paths += %W( #{config.root}/app/controllers #{config.root}/app/models #{config.root}/app/helpers #{config.root}/app/uploaders) + initializer "locomotive.cells" do |app| + Cell::Base.prepend_view_path("#{config.root}/app/cells") + end + rake_tasks do load "railties/tasks.rake" end