Class: Lines::Picture
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Lines::Picture
- Defined in:
- app/models/lines/picture.rb
Instance Method Summary collapse
-
#default_name ⇒ Object
Returns the default name fo a picture.
Instance Method Details
#default_name ⇒ Object
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 |