Class: Plotline::Image

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/plotline/image.rb

Instance Method Summary collapse

Instance Method Details

#filenameObject



6
7
8
# File 'app/models/plotline/image.rb', line 6

def filename
  remote_file? ? image : File.join('./public', image)
end

#remove_image_fileObject



10
11
12
# File 'app/models/plotline/image.rb', line 10

def remove_image_file
  File.delete(filename) unless remote_file?
end