Sha256: 99f47fd48f62764d6bca6ccaac7e7f2c8c7bf48ece2048714739fa37c4e374c0

Contents?: true

Size: 609 Bytes

Versions: 21

Compression:

Stored size: 609 Bytes

Contents

class Pulitzer::CreatePostContentElements
  attr_accessor :post

  def initialize(post)
    self.post = post
  end

  def call
    post.post_type_content_element_types.each do |cet|
      post.preview_version.content_elements.create do |ce|
        ce.label                          = cet.label
        ce.height                         = cet.height
        ce.width                          = cet.width
        ce.text_editor                    = cet.text_editor
        ce.content_element_type           = cet.content_element_type
        ce.post_type_content_element_type = cet
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pulitzer-0.3.9 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.8 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.7 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.6 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.5 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.4 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.3 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.2 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.1 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.3.0 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.2.2 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.2.1 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.2.0 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.10 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.9 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.8 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.7 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.6 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.5 app/interactions/pulitzer/create_post_content_elements.rb
pulitzer-0.1.4 app/interactions/pulitzer/create_post_content_elements.rb