mirror of
https://github.com/wahyd4/libr-2.git
synced 2026-08-09 13:26:05 +10:00
15 lines
233 B
Ruby
15 lines
233 B
Ruby
class Article < Post
|
|
|
|
|
|
before_update :update_content
|
|
|
|
private
|
|
|
|
def update_content
|
|
if self.changed? && self.css_selector_changed?
|
|
PostContentWorker.perform_async self.id, self.url, self.css_selector
|
|
end
|
|
end
|
|
|
|
end
|