diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-18 17:32:46 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-18 17:32:46 +0000 |
commit | 53a469c0000eb1f487eab456c0986d427d714bd7 (patch) | |
tree | dd0f8c72a73f18371f50fa5559bb43d10b7301b5 /lib/puppet/rails/resource.rb | |
parent | d5569bcf30ad40b1780c1550368455127114cdd2 (diff) | |
download | puppet-53a469c0000eb1f487eab456c0986d427d714bd7.tar.gz puppet-53a469c0000eb1f487eab456c0986d427d714bd7.tar.xz puppet-53a469c0000eb1f487eab456c0986d427d714bd7.zip |
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
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r-- | lib/puppet/rails/resource.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |