From c14089189a3c7e57016c3dd0d6c81bee7d36d859 Mon Sep 17 00:00:00 2001 From: Frank Sweetser Date: Wed, 2 Jun 2010 15:04:57 -0400 Subject: [PATCH] Change to_label to to_s in count_habtm --- app/models/host.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/app/models/host.rb b/app/models/host.rb index 05aa6a3..03a754a 100644 --- a/app/models/host.rb +++ b/app/models/host.rb @@ -367,7 +367,7 @@ class Host < Puppet::Rails::Host output = {} Host.count(:include => assocication.pluralize, :group => "#{assocication}_id").to_a.each do |a| #Ugly Ugly Ugly - I guess I'm missing something basic here - label = eval(assocication.camelize).send("find",a[0].to_i).to_label if a[0] + label = eval(assocication.camelize).send("find",a[0].to_i).to_s if a[0] output[label] = a[1] end output -- 1.6.6.1