Class: Image

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Uploadable
Defined in:
app/models/image.rb,
lib/generators/uploadbox/image/templates/models/image.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



8
9
10
# File 'app/models/image.rb', line 8

def name
  File.basename(original_file)
end

#processObject



4
5
6
# File 'app/models/image.rb', line 4

def process
  update(remote_file_url: original_file)
end

#processing?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/image.rb', line 12

def processing?
  file.blank?
end