]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/file_column/init.rb
Make database offline mode work
[rails.git] / vendor / plugins / file_column / init.rb
index d31ef1b9c109244d1610258598b4e8a1b9053d3f..6ecbba5f6726c0c13873a057f08c762aa6e7c10f 100644 (file)
@@ -8,6 +8,11 @@ require 'file_column_helper'
 require 'validations'
 require 'test_case'
 
 require 'validations'
 require 'test_case'
 
-ActiveRecord::Base.send(:include, FileColumn)
-ActionView::Base.send(:include, FileColumnHelper)
-ActiveRecord::Base.send(:include, FileColumn::Validations)
\ No newline at end of file
+if defined?(ActionRecord::Base)
+  ActiveRecord::Base.send(:include, FileColumn)
+  ActiveRecord::Base.send(:include, FileColumn::Validations)
+end
+
+if defined?(ActionView::Base)
+  ActionView::Base.send(:include, FileColumnHelper)
+end