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, #temp_path, #transform_with_magick

Constructor Details

This class inherits a constructor from FileColumn::BaseUploadedFile

Instance Method Details

#absolute_path(subdir = nil) ⇒ Object


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

def absolute_path(subdir=nil)
  nil
end

#assign_temp(temp_path) ⇒ Object


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

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


142
143
144
145
# File 'lib/file_column.rb', line 142

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

#relative_path(subdir = nil) ⇒ Object


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

def relative_path(subdir=nil)
  nil
end

#upload(file) ⇒ Object


147
148
149
150
151
152
# File 'lib/file_column.rb', line 147

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