mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 03:32:18 -05:00
14 lines
302 B
Ruby
14 lines
302 B
Ruby
require "thor"
|
|
|
|
module Cli
|
|
class CollectionsCommand < Thor
|
|
namespace :collections
|
|
DESCRIPTION = "manage collections"
|
|
|
|
desc "prune", "removes all empty collections"
|
|
def prune
|
|
Collection.find_each { |it| it.destroy if it.models.empty? && it.collections.empty? }
|
|
end
|
|
end
|
|
end
|