Sha256: 556f27c1121e67164265cb6ae5c8fa5c53d0dbb56e8bdffd5f625653423062f1

Contents?: true

Size: 716 Bytes

Versions: 21

Compression:

Stored size: 716 Bytes

Contents

class Pulitzer::CreatePostTypeContentElements
  attr_accessor :post_type_version, :ptcet, :old_label

  def initialize(ptcet)
    self.post_type_version  = ptcet.post_type_version
    self.ptcet              = ptcet
  end

  def call
    post_type_version.posts.each do |post|
      post.preview_version.content_elements.create do |ce|
        ce.label                          = ptcet.label
        ce.height                         = ptcet.height
        ce.width                          = ptcet.width
        ce.text_editor                    = ptcet.text_editor
        ce.content_element_type           = ptcet.content_element_type
        ce.post_type_content_element_type = ptcet
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pulitzer-0.15.31 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.30 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.29 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.28 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.27 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.26 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.25 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.24 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.23 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.22 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.21 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.20 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.19 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.18 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.17 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.16 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.15 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.14 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.13 app/interactions/pulitzer/create_post_type_content_elements.rb
pulitzer-0.15.12 app/interactions/pulitzer/create_post_type_content_elements.rb