diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-07-15 16:38:04 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-07-18 19:44:13 -0700 |
commit | d319da41e46f0f3621180d09d3110f67003a7527 (patch) | |
tree | e69c8969dc25c2dd155ac49e2345e170830f5784 /lib/puppet/rails/resource.rb | |
parent | 9f915402f5cf54c0f78dd34fefdde5f2f840cda7 (diff) | |
download | puppet-d319da41e46f0f3621180d09d3110f67003a7527.tar.gz puppet-d319da41e46f0f3621180d09d3110f67003a7527.tar.xz puppet-d319da41e46f0f3621180d09d3110f67003a7527.zip |
[#4247] storeconfigs was calling Puppet::Parser::Resource.new with the wrong arguments
When the interface to Puppet::Resource changed, its subclass
Puppet::Parser::Resource was also affected. One case of initializing
those objects did not get updated when the code changed, causing
storeconfigs to break.
Also, this patch adds a error message that would have made it easier to
catch this problem (as puppet could consume all memory and die trying to
print the old error message)
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r-- | lib/puppet/rails/resource.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb index a5cdd0c13..582cdd41a 100644 --- a/lib/puppet/rails/resource.rb +++ b/lib/puppet/rails/resource.rb @@ -212,16 +212,16 @@ class Puppet::Rails::Resource < ActiveRecord::Base end hash[:scope] = scope hash[:source] = scope.source - hash[:params] = [] + hash[:parameters] = [] 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 - hash[:params] << pname.to_resourceparam(self, scope.source) + hash[:parameters] << pname.to_resourceparam(self, scope.source) end - obj = Puppet::Parser::Resource.new(hash) + obj = Puppet::Parser::Resource.new(hash.delete("type"), hash.delete("title"), hash) # Store the ID, so we can check if we're re-collecting the same resource. obj.rails_id = self.id |