22 lines
347 B
Ruby
22 lines
347 B
Ruby
|
module E621
|
||
|
class Post < ApplicationRecord
|
||
|
self.table_name = "e621.posts"
|
||
|
|
||
|
module SyncMethods
|
||
|
def sync
|
||
|
E621ExportDownloadJob.perform_later("posts")
|
||
|
end
|
||
|
|
||
|
def sync!
|
||
|
E621ExportDownloadJob.perform_now("posts")
|
||
|
end
|
||
|
end
|
||
|
|
||
|
extend SyncMethods
|
||
|
|
||
|
def tags
|
||
|
tag_string.split
|
||
|
end
|
||
|
end
|
||
|
end
|