summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-13 18:27:22 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-05-13 18:27:22 +0000
commit9e9ef1acc6231254e52b96257ed1e81475d2d1bc (patch)
treedb3fec56ad53ee8741c1c07e56e4f965e1f24320 /lib/puppet/rails
parent8ed666a7c202420d4bc59cea77f3bd0bec95cc11 (diff)
downloadpuppet-9e9ef1acc6231254e52b96257ed1e81475d2d1bc.tar.gz
puppet-9e9ef1acc6231254e52b96257ed1e81475d2d1bc.tar.xz
puppet-9e9ef1acc6231254e52b96257ed1e81475d2d1bc.zip
The "collectable" syntax now works end-to-end -- the parser correctly recognizes it, the AST objects retain the settings, the scopes do the right conversion, the interpreter stores them all in the database, and then it strips the collectable objects out before sending the object list to the client
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1189 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/rails')
-rw-r--r--lib/puppet/rails/host.rb2
-rw-r--r--lib/puppet/rails/rails_object.rb8
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/puppet/rails/host.rb b/lib/puppet/rails/host.rb
index 0cfb3ec44..3736c407d 100644
--- a/lib/puppet/rails/host.rb
+++ b/lib/puppet/rails/host.rb
@@ -63,7 +63,7 @@ class Puppet::Rails::Host < ActiveRecord::Base
tobj.each do |p,v| params[p] = v end
args = {:ptype => tobj.type, :name => tobj.name}
- [:tags, :file, :line].each do |param|
+ [:tags, :file, :line, :collectable].each do |param|
if val = tobj.send(param)
args[param] = val
end
diff --git a/lib/puppet/rails/rails_object.rb b/lib/puppet/rails/rails_object.rb
index 819706957..8aa72451b 100644
--- a/lib/puppet/rails/rails_object.rb
+++ b/lib/puppet/rails/rails_object.rb
@@ -20,7 +20,9 @@ class Puppet::Rails::RailsObject < ActiveRecord::Base
end
end
- # Convert our object to a trans_object
+ # Convert our object to a trans_object. Do not retain whether the object
+ # is collectable, though, since that would cause it to get stripped
+ # from the configuration.
def to_trans
obj = Puppet::TransObject.new(name(), ptype())
@@ -29,8 +31,8 @@ class Puppet::Rails::RailsObject < ActiveRecord::Base
obj.send(method.to_s + "=", val)
end
end
- params.each do |name, value|
- obj[name] = value
+ rails_parameters.each do |param|
+ obj[param.name] = param.value
end
return obj