Allow the root directory for data for file columns to be configured
authorTom Hughes <tom@compton.nu>
Wed, 4 Aug 2010 23:14:58 +0000 (00:14 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 4 Aug 2010 23:14:58 +0000 (00:14 +0100)
config/application.yml
config/initializers/file_column.rb [new file with mode: 0644]

index cf6d5fa..25df99d 100644 (file)
@@ -51,6 +51,8 @@ standard_settings: &standard_settings
   # Location of GPX traces and images
   gpx_trace_dir: "/home/osm/traces"
   gpx_image_dir: "/home/osm/images"
+  # Location of data for file columns
+  #file_column_root: ""
 
 development:
   <<: *standard_settings
diff --git a/config/initializers/file_column.rb b/config/initializers/file_column.rb
new file mode 100644 (file)
index 0000000..6447ef5
--- /dev/null
@@ -0,0 +1,3 @@
+if defined?(FILE_COLUMN_ROOT)
+  FileColumn::ClassMethods::DEFAULT_OPTIONS[:root_path] = FILE_COLUMN_ROOT
+end