Closed
Description
Describe your problem here.
Commands
bundle exec rake annotate_models
example model below. Also, primary keys are uuid in case that matters
class Site < ApplicationRecord
belongs_to :user
validates :anchor_link, url: { allow_blank: true, allow_nil: true }
after_create_commit :post_creation_callback
def post_creation_callback
Seo::ChooseAnchorTextJob.perform_later(self.class.to_s, id)
end
after_save do
if saved_change_to_anchor_text? || saved_change_to_anchor_link?
Seo::SyncAnchorTextJob.set(wait: 1.minutes).perform_later(self.class.to_s, self.id) rescue nil
end
end
end
Version
- annotate version: 3.0.3
- rails version: 5.2.3
- ruby version: 2.5.1p57
Metadata
Metadata
Assignees
Labels
No labels