summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/resource.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-14 18:10:37 -0600
committerLuke Kanies <luke@madstop.com>2009-02-14 18:10:37 -0600
commite87de9d8f3be325fb0495dd5c64e08625333924f (patch)
tree8a7ed2ff7e375f3c0c91623de1ccf8b71a1d7317 /lib/puppet/rails/resource.rb
parent487b9b1a3e8b9207a9910bc5eaeeb75cb3e4abe5 (diff)
parent24d48e6c07ef634971fcb8ed5b27258db161a018 (diff)
downloadpuppet-e87de9d8f3be325fb0495dd5c64e08625333924f.tar.gz
puppet-e87de9d8f3be325fb0495dd5c64e08625333924f.tar.xz
puppet-e87de9d8f3be325fb0495dd5c64e08625333924f.zip
Merge branch '0.24.x'
Conflicts: test/ral/manager/type.rb
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r--lib/puppet/rails/resource.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index bd2739d53..c3d287af2 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -1,5 +1,6 @@
require 'puppet'
require 'puppet/rails/param_name'
+require 'puppet/rails/param_value'
require 'puppet/rails/puppet_tag'
require 'puppet/util/rails/collection_merger'
@@ -57,7 +58,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
# returns a hash of param_names.name => [param_values]
def get_params_hash(values = nil)
- values ||= @params_hash || Puppet::Rails::ParamValues.find_all_params_from_resource(id)
+ values ||= @params_hash || Puppet::Rails::ParamValue.find_all_params_from_resource(self)
if values.size == 0
return {}
end
@@ -69,7 +70,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
end
def get_tag_hash(tags = nil)
- tags ||= @tags_hash || Puppet::Rails::ResourceTag.find_all_tags_from_resource(id)
+ tags ||= @tags_hash || Puppet::Rails::ResourceTag.find_all_tags_from_resource(self)
return tags.inject({}) do |hash, tag|
# We have to store the tag object, not just the tag name.
hash[tag['name']] = tag
@@ -99,7 +100,7 @@ class Puppet::Rails::Resource < ActiveRecord::Base
result = get_params_hash
result.each do |param, value|
if value.is_a?(Array)
- result[param] = value.collect { |v| v.value }
+ result[param] = value.collect { |v| v['value'] }
else
result[param] = value.value
end