Sha256: 5474ddc9d53af0e06a8ba87c3952ae06f80cc39de976eeb7523167d5e6f90524

Contents?: true

Size: 351 Bytes

Versions: 3

Compression:

Stored size: 351 Bytes

Contents

module LatoBlog

  # This module contains a list of functions used to manage posts for the blog.
  module Interface::Posts

    # This function cleans all old post parents without any child.
    def blog__clean_post_parents
      post_parents = LatoBlog::PostParent.all
      post_parents.map { |pp| pp.destroy if pp.posts.empty? }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lato_blog-2.1.2 lib/lato_blog/interfaces/posts.rb
lato_blog-2.1.1 lib/lato_blog/interfaces/posts.rb
lato_blog-2.1 lib/lato_blog/interfaces/posts.rb