]> git.openstreetmap.org Git - rails.git/commitdiff
Don't eager load models when the database is offline
authorTom Hughes <tom@compton.nu>
Sat, 4 Feb 2012 00:42:47 +0000 (00:42 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 4 Feb 2012 00:42:47 +0000 (00:42 +0000)
config/application.rb

index 0713451e52cd44f4d015f120c4117a9ad56526c6..8c8f4c926f47bc0085a2a8b5b45816aa4b126f5b 100644 (file)
@@ -63,5 +63,10 @@ module OpenStreetMap
     unless STATUS == :database_offline
       config.active_record.schema_format = :sql
     end
+
+    # Don't eager load models when the database is offline
+    if STATUS == :database_offline
+      config.paths["app/models"].skip_eager_load!
+    end
   end
 end