Sha256: 87a0b249a412853f592561e2649330e988c49a4ec2388b4e3b5816d2d0096d56
Contents?: true
Size: 463 Bytes
Versions: 31
Compression:
Stored size: 463 Bytes
Contents
class Pulitzer::PostTypesController::CreateSingletonPost attr_accessor :post_type_version, :title def initialize(post_type_version) self.post_type_version = post_type_version self.title = post_type_version.name end def call if post_type_version.singular? && !post_type_version.posts.any? singleton_post = post_type_version.posts.create(title: title) Pulitzer::CreatePostContentElements.new(singleton_post).call end end end
Version data entries
31 entries across 31 versions & 1 rubygems