summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r--lib/puppet/rails/resource.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index 19aeb9205..785c63419 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -104,16 +104,16 @@ class Puppet::Rails::Resource < ActiveRecord::Base
end
hash[:scope] = scope
hash[:source] = scope.source
- obj = Puppet::Parser::Resource.new(hash)
-
+ hash[:params] = []
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))
+ hash[:params] << pname.to_resourceparam(self, scope.source)
end
+ obj = Puppet::Parser::Resource.new(hash)
# Store the ID, so we can check if we're re-collecting the same resource.
obj.rails_id = self.id
@@ -121,5 +121,3 @@ class Puppet::Rails::Resource < ActiveRecord::Base
return obj
end
end
-
-# $Id$