summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/resource.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-20 22:25:00 -0500
committerLuke Kanies <luke@madstop.com>2007-08-20 22:25:00 -0500
commit4eb87ed7c8829a6fbc558595be9149e9b3cf5b36 (patch)
tree5c8319949022f932eb6467b17b55debaa42fa125 /lib/puppet/rails/resource.rb
parent2a4e1011dbc244754f434f7eb97f3d41463e5cd4 (diff)
downloadpuppet-4eb87ed7c8829a6fbc558595be9149e9b3cf5b36.tar.gz
puppet-4eb87ed7c8829a6fbc558595be9149e9b3cf5b36.tar.xz
puppet-4eb87ed7c8829a6fbc558595be9149e9b3cf5b36.zip
A round of bugfixing. Many more tests now pass -- I think we are largely down to tests that (yay!) fail in trunk.
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$