Displaying 1 result from an estimated 1 matches for "file_column_db".
2006 Jan 17
0
file_column with both root_path and store_dir
...|= File.join(options[:root_path], model, attr)
Here''s my test:
def test_absolute_path_outside_rails_root
# We might want to store our files on another file system
# We also want to give the user their own directory
Entry.file_column :image, {:root_path => "/u/
file_column_db", :store_dir => store_dir_method}
e = Entry.new
e.image = uploaded_file(file_path("kerb.jpg"), "image/jpeg",
"kerb.jpg")
assert File.exists?(e.image)
assert e.image !~ /\.\./, "#{e.image} is not a simple path"
assert_match %...