Class: Cli::ProblemsCommand
- Inherits:
-
Thor
- Object
- Thor
- Cli::ProblemsCommand
- Defined in:
- app/lib/cli/problems_command.rb
Constant Summary collapse
- DESCRIPTION =
"manage problems"
Instance Method Summary collapse
Instance Method Details
#prune ⇒ Object
9 10 11 |
# File 'app/lib/cli/problems_command.rb', line 9 def prune Upgrade::PruneOrphanedProblems.perform_now end |
#purge ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/lib/cli/problems_command.rb', line 16 def purge return unless ask("Are you sure you want to remove all problems", limited_to: %w[y n]) == "y" scope = Problem scope = scope.where(type: [:type]) if [:type] scope = scope.where(problematic_type: [:class]) if [:class] scope.destroy_all end |