Sha256: 46aa92a6063a6815a7ef499aab9fe66783ec62f9ee8e78f0c2bf7ba9cc12e03d
Contents?: true
Size: 576 Bytes
Versions: 6
Compression:
Stored size: 576 Bytes
Contents
module Enjoy::Seo::SitemapDataField extend ActiveSupport::Concern FIELDS = [:sitemap_show, :sitemap_lastmod, :sitemap_changefreq, :sitemap_priority] included do has_one :sitemap_data, as: :sitemap_data_field, autosave: true, class_name: "Enjoy::Seo::SitemapData" accepts_nested_attributes_for :sitemap_data delegate *FIELDS, to: :sitemap_data delegate *(FIELDS.map {|f| "#{f}=".to_sym }), to: :sitemap_data alias sitemap_data_without_build sitemap_data def sitemap_data sitemap_data_without_build || build_sitemap_data end end end
Version data entries
6 entries across 6 versions & 1 rubygems