summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/resource.rb
diff options
context:
space:
mode:
authorballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-12 20:06:51 +0000
committerballman <ballman@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-12 20:06:51 +0000
commitea190c1ad966ca28b9383b4163205a2637763c02 (patch)
tree8227d7db44523c54c5321b52f6acb2dd323c0142 /lib/puppet/rails/resource.rb
parent3003aad5f6f18bb569dc95857990fb53806e280c (diff)
downloadpuppet-ea190c1ad966ca28b9383b4163205a2637763c02.tar.gz
puppet-ea190c1ad966ca28b9383b4163205a2637763c02.tar.xz
puppet-ea190c1ad966ca28b9383b4163205a2637763c02.zip
Changed the host to "eager fetch" all the resources and their associated
tables. Also removed some unecessary lines from resource.rb that were causng it to re-read information it already loaded from the db. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2568 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r--lib/puppet/rails/resource.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index d2d4ec21f..0287a5a76 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -34,7 +34,6 @@ class Puppet::Rails::Resource < ActiveRecord::Base
# returns a hash of param_names.name => [param_values]
def get_params_hash
- param_values = self.param_values.find(:all, :include => :param_name)
return param_values.inject({}) do | hash, value |
hash[value.param_name.name] ||= []
hash[value.param_name.name] << value
@@ -43,8 +42,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
end
def get_tag_hash
- tags = self.resource_tags.find(:all, :include => :puppet_tag)
- return tags.inject({}) do |hash, tag|
+ return resource_tags.inject({}) do |hash, tag|
hash[tag.puppet_tag.name] = tag.puppet_tag.name
hash
end