Class: FileColumn::NoUploadedFile

Inherits:
BaseUploadedFile show all
Defined in:
lib/file_column.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from BaseUploadedFile

#absolute_dir, #after_destroy, #after_save, #assign, #initialize, #just_uploaded?, #on_save, #options, #relative_dir, #store, #temp_path

Constructor Details

This class inherits a constructor from FileColumn::BaseUploadedFile

Instance Method Details

#absolute_path(subdir = nil) ⇒ Object



166
167
168
# File 'lib/file_column.rb', line 166

def absolute_path(subdir=nil)
  nil
end

#assign_temp(temp_path) ⇒ Object



175
176
177
178
179
180
# File 'lib/file_column.rb', line 175

def assign_temp(temp_path)
  return self if temp_path.nil? or temp_path.empty?
  temp = clone_as TempUploadedFile
  temp.parse_temp_path temp_path
  temp
end

#deleteObject



154
155
156
157
# File 'lib/file_column.rb', line 154

def delete
  # we do not have a file so deleting is easy
  self
end

#relative_path(subdir = nil) ⇒ Object



171
172
173
# File 'lib/file_column.rb', line 171

def relative_path(subdir=nil)
  nil
end

#upload(file) ⇒ Object



159
160
161
162
163
164
# File 'lib/file_column.rb', line 159

def upload(file)
  # replace ourselves with a TempUploadedFile
  temp = clone_as TempUploadedFile
  temp.store_upload(file)
  temp
end