Class: Sibu::Image
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Sibu::Image
- Extended by:
- UserConcern
- Defined in:
- app/models/sibu/image.rb
Class Method Summary collapse
Methods included from UserConcern
Class Method Details
.empty ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/models/sibu/image.rb', line 10 def self.empty empty_img = where("metadata ILIKE '%default_empty_image%'").first if empty_img.nil? empty_img = new(reference: 'default_empty_image', file: File.new('app/assets/images/empty.png')) empty_img.save end empty_img end |