Class: CanDo::Capability

Inherits:
Object
  • Object
show all
Defined in:
lib/models/capability.rb

Class Method Summary collapse

Class Method Details

.cleanupObject



6
7
8
9
10
11
12
# File 'lib/models/capability.rb', line 6

def self.cleanup
  Capability.all do |cap|
    if cap.roles.count == 0
      cap.destroy
    end
  end
end