Sha256: 743ef13efed3dc7fe7c94dc11622263ca30f02c4b54ba7d5daf18aa22cf5bb31
Contents?: true
Size: 461 Bytes
Versions: 52
Compression:
Stored size: 461 Bytes
Contents
class Pulitzer::UpdatePostTypeFreeFormSections attr_accessor :post_type, :ffst, :old_label def initialize(ffst, old_label=nil) self.post_type = ffst.post_type self.ffst = ffst self.old_label = old_label || ffst.label end def call post_type.posts.each do |post| post.preview_version.free_form_sections.where(free_form_section_type_id: ffst.id).each do |ffs| ffs.update(name: ffst.name) end end end end
Version data entries
52 entries across 52 versions & 1 rubygems