Class: ForemanDatacenter::Site
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ForemanDatacenter::Site
- Defined in:
- app/models/foreman_datacenter/site.rb
Instance Method Summary collapse
Instance Method Details
#devices_count ⇒ Object
16 17 18 19 20 |
# File 'app/models/foreman_datacenter/site.rb', line 16 def devices_count @devices_count ||= self.class.where(id: id). joins(racks: :devices). count end |
#racks_count ⇒ Object
12 13 14 |
# File 'app/models/foreman_datacenter/site.rb', line 12 def racks_count @racks_count ||= racks.count end |