Class: CanDo::Capability
- Inherits:
-
Object
- Object
- CanDo::Capability
- Defined in:
- lib/models/capability.rb
Class Method Summary collapse
Class Method Details
.cleanup ⇒ Object
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 |