You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
282 B

  1. # frozen_string_literal: true
  2. module DomainMaterializable
  3. extend ActiveSupport::Concern
  4. included do
  5. after_create_commit :refresh_instances_view
  6. end
  7. def refresh_instances_view
  8. Instance.refresh unless domain.nil? || Instance.where(domain: domain).exists?
  9. end
  10. end