From a53363d9f63daaed2adc6e9ea9c12989feefe709 Mon Sep 17 00:00:00 2001 From: JGW Maxwell Date: Wed, 11 Jul 2012 02:58:59 +0100 Subject: [PATCH] Fixed default ActiveRecord setting preventing generator from running. --- lib/impressionist/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/impressionist/engine.rb b/lib/impressionist/engine.rb index dbf109f..fddb04f 100644 --- a/lib/impressionist/engine.rb +++ b/lib/impressionist/engine.rb @@ -5,7 +5,7 @@ module Impressionist class Engine < Rails::Engine initializer 'impressionist.model' do |app| require "#{root}/app/models/impressionist/impressionable.rb" - if Impressionist.orm == :active_record + if Impressionist.orm == :active_record && defined? ActiveRecord require "impressionist/models/active_record/impression.rb" require "impressionist/models/active_record/impressionist/impressionable.rb" ActiveRecord::Base.send(:include, Impressionist::Impressionable)