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, full_table_name, gender_enum, #get_hashed_string, get_hashed_string, #indifferent_attributes, reset_all_schemas, reset_qualified_schema, saved_qualified_schema, schema_qualified, set_audit_methods!, table_name_only

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