0001-Change-to_label-to-to_s-in-count_habtm.patch
| b/app/models/host.rb | ||
|---|---|---|
| 367 | 367 |
output = {}
|
| 368 | 368 |
Host.count(:include => assocication.pluralize, :group => "#{assocication}_id").to_a.each do |a|
|
| 369 | 369 |
#Ugly Ugly Ugly - I guess I'm missing something basic here |
| 370 |
label = eval(assocication.camelize).send("find",a[0].to_i).to_label if a[0]
|
|
| 370 |
label = eval(assocication.camelize).send("find",a[0].to_i).to_s if a[0]
|
|
| 371 | 371 |
output[label] = a[1] |
| 372 | 372 |
end |
| 373 | 373 |
output |
| 374 |
- |
|
