Class: FileColumn::NoUploadedFile

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

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from BaseUploadedFile

#magick_errors

Instance Method Summary collapse

Methods inherited from BaseUploadedFile

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

Constructor Details

This class inherits a constructor from FileColumn::BaseUploadedFile

Instance Method Details

#absolute_path(subdir = nil) ⇒ Object



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

def absolute_path(subdir=nil)
  nil
end

#assign_temp(temp_path) ⇒ Object



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

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



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

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

#relative_path(subdir = nil) ⇒ Object



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

def relative_path(subdir=nil)
  nil
end

#upload(file) ⇒ Object



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

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