From 53a469c0000eb1f487eab456c0986d427d714bd7 Mon Sep 17 00:00:00 2001 From: luke Date: Wed, 18 Jul 2007 17:32:46 +0000 Subject: Fixing #703, mostly. You still cannot do multi-condition queries, but you can at least query against any parameter, and matching any value is sufficient for a match, so the tags work fine. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2705 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/rails/resource.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/puppet/rails/resource.rb') diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb index 233982ed9..19aeb9205 100644 --- a/lib/puppet/rails/resource.rb +++ b/lib/puppet/rails/resource.rb @@ -106,7 +106,12 @@ class Puppet::Rails::Resource < ActiveRecord::Base hash[:source] = scope.source obj = Puppet::Parser::Resource.new(hash) + names = [] self.param_names.each do |pname| + # We can get the same name multiple times because of how the + # db layout works. + next if names.include?(pname.name) + names << pname.name obj.set(pname.to_resourceparam(self, scope.source)) end -- cgit