Sha256: ec5e2ac78b450af0719471a8c32c88258a32a22a1cbe02a970635e4416b239e6

Contents?: true

Size: 381 Bytes

Versions: 6

Compression:

Stored size: 381 Bytes

Contents

class Pulitzer::SetupPostElements
  attr_accessor :post

  def initialize(post)
    self.post = post
  end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pulitzer-0.1.1 app/interactions/pulitzer/setup_post_elements.rb
pulitzer-0.1.0 app/interactions/pulitzer/setup_post_elements.rb
pulitzer-0.0.5 app/interactions/pulitzer/setup_post_elements.rb
pulitzer-0.0.4 app/interactions/pulitzer/setup_post_elements.rb
pulitzer-0.0.3 app/interactions/pulitzer/setup_post_elements.rb
pulitzer-0.0.2 app/interactions/pulitzer/setup_post_elements.rb