Fixed default ActiveRecord setting preventing generator from running.

This commit is contained in:
JGW Maxwell 2012-07-11 02:58:59 +01:00
parent 7ab364c7eb
commit a53363d9f6
1 changed files with 1 additions and 1 deletions

View File

@ -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)