Sha256: efebe66e382e91714fa98809667646b672dce65e5a0556bdbeb30dce5bdc96c9
Contents?: true
Size: 554 Bytes
Versions: 9
Compression:
Stored size: 554 Bytes
Contents
class Pulitzer::DestroyFreeFormSectionPartials def initialize(partial_type) @partial_type = partial_type end def call free_form_section_type = @partial_type.free_form_section_type post_type = free_form_section_type.post_type post_type.posts.each do |post| if post.preview_version free_form_section = post.preview_version.free_form_sections.find_by(name: free_form_section_type.name) partial = free_form_section.partials.find_by(label: @partial_type.label)&.destroy end end end end
Version data entries
9 entries across 9 versions & 1 rubygems