Sha256: e297ebe5ecfdcc36117321c26ab38db75ef6efc286e43928d8609978e3215244

Contents?: true

Size: 567 Bytes

Versions: 18

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module Cmor
  module Seo
    module Models
      module SeoableConcern
        extend ActiveSupport::Concern

        included do
          has_one :seo_item, class_name: "Cmor::Seo::Item", as: :resource, dependent: :destroy

          after_save :generate_seo_meta_tags
        end

        def generate_seo_meta_tags
          Cmor::Seo::GenerateMetaTagsService.call_later!(resources: [self])
        rescue => e
          ::Cmor::Seo::Configuration.handle_seoable_after_save_exception.call(e)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cmor_seo-0.0.60.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.59.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.58.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.57.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.56.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.55.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.54.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.53.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.52.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.51.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.50.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.49.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.48.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.45.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.44.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.43.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.42.pre app/concerns/cmor/seo/models/seoable_concern.rb
cmor_seo-0.0.41.pre app/concerns/cmor/seo/models/seoable_concern.rb