Class: BetterRecord::AttachmentValidation

Inherits:
Base
  • Object
show all
Defined in:
app/models/better_record/attachment_validation.rb

Class Method Summary collapse

Methods inherited from Base

#dup, gender_enum, get_hashed_string, #get_hashed_string, #indifferent_attributes, set_audit_methods!

Class Method Details

.delete_invalidObject

Class Methods ========================================================



31
32
33
34
35
# File 'app/models/better_record/attachment_validation.rb', line 31

def self.delete_invalid
  BetterRecord::AttachmentValidation.
    where.not( id: BetterRecord::AttachmentValidation.joins(:attachment).select(:id) ).
    delete_all
end