Class: Lines::Picture

Inherits:
ApplicationRecord show all
Defined in:
app/models/lines/picture.rb

Instance Method Summary collapse

Instance Method Details

#default_nameObject

Returns the default name fo a picture



20
21
22
# File 'app/models/lines/picture.rb', line 20

def default_name
  self.name ||= File.basename(image.filename, '.*').titleize if image
end