diff options
author | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 22:04:09 +0000 |
---|---|---|
committer | shadoi <shadoi@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-19 22:04:09 +0000 |
commit | 115ec095357171381e2af3aa5ebbd61164b40064 (patch) | |
tree | 2060872eefd6fdbae72a20cb95998a1d364c8a80 /lib/puppet/rails/resource.rb | |
parent | f851ca64cf3861ffa63cf2698fd4719361803f82 (diff) | |
download | puppet-115ec095357171381e2af3aa5ebbd61164b40064.tar.gz puppet-115ec095357171381e2af3aa5ebbd61164b40064.tar.xz puppet-115ec095357171381e2af3aa5ebbd61164b40064.zip |
Re-add support for tags and file/lines
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1953 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r-- | lib/puppet/rails/resource.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb index 011b9a883..43d7bbf4b 100644 --- a/lib/puppet/rails/resource.rb +++ b/lib/puppet/rails/resource.rb @@ -8,10 +8,20 @@ class Puppet::Rails::Resource < ActiveRecord::Base has_many :param_values, :through => :param_names has_many :param_names, :dependent => :destroy - has_many :source_files + belongs_to :source_file belongs_to :host acts_as_taggable + + def tags=(tags) + tags.each do |tag| + self.tag_with tag + end + end + + def file=(file) + self.source_file = Puppet::Rails::SourceFile.new(:filename => file) + end def [](param) return super || parameter(param) |