diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-13 07:49:48 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-13 07:49:48 +0000 |
commit | 35de0e3bd74e94de92ac0e9209a4884cf07c88a0 (patch) | |
tree | be7119181bc15dad6575cc5b7087c92cfd7fbac8 /lib/puppet/parser/resource.rb | |
parent | 26b32b953d8e097785b38aa90e5e4bff6ae9247e (diff) | |
download | puppet-35de0e3bd74e94de92ac0e9209a4884cf07c88a0.tar.gz puppet-35de0e3bd74e94de92ac0e9209a4884cf07c88a0.tar.xz puppet-35de0e3bd74e94de92ac0e9209a4884cf07c88a0.zip |
Temporarily reverting all of the recent rails work so that I can release 0.20.1
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1873 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/resource.rb')
-rw-r--r-- | lib/puppet/parser/resource.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 8c1153929..cb339e38d 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -256,25 +256,27 @@ class Puppet::Parser::Resource # with. def store(host) args = {} - #FIXME: support files/lines, etc. - #%w{type title tags file line exported}.each do |param| - %w{type title tags exported}.each do |param| + %w{type title tags file line exported}.each do |param| if value = self.send(param) args[param] = value end end + # 'type' isn't a valid column name, so we have to use something else. args = symbolize_options(args) + args[:restype] = args[:type] + args.delete(:type) # Let's see if the object exists - if obj = host.resources.find_by_type_and_title(self.type, self.title) + #if obj = host.rails_resources.find_by_type_and_title(self.type, self.title) + if obj = host.rails_resources.find_by_restype_and_title(self.type, self.title) # We exist args.each do |param, value| obj[param] = value end else # Else create it anew - obj = host.resources.build(args) + obj = host.rails_resources.build(args) end # Either way, now add our parameters |