Class: E621::PostReplacement

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
CsvImportable, T::Sig
Defined in:
lib/e621/post_replacement.rb

Class Method Summary collapse

Methods included from CsvImportable

import_from_csv

Class Method Details

.upsert_all_from_export(records) ⇒ Object



21
22
23
# File 'lib/e621/post_replacement.rb', line 21

def self.upsert_all_from_export(records)
  upsert_all(records.map { |r| attributes_from_export(r) })
end

.upsert_from_export(record) ⇒ Object



16
17
18
# File 'lib/e621/post_replacement.rb', line 16

def self.upsert_from_export(record)
  upsert(attributes_from_export(record))
end