diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2008-08-13 17:02:35 +0200 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-08-17 23:43:10 +1000 |
commit | f48a0ae140661dc14934c0a192c71687929b0624 (patch) | |
tree | 8d8c29c61e41e9bc94626915298c1aeed30d7164 /lib/puppet/rails/resource.rb | |
parent | b1ad596ec0aa3158d70f84d5b1e002f972d3ec71 (diff) | |
download | puppet-f48a0ae140661dc14934c0a192c71687929b0624.tar.gz puppet-f48a0ae140661dc14934c0a192c71687929b0624.tar.xz puppet-f48a0ae140661dc14934c0a192c71687929b0624.zip |
Fix #1510 - storeconfig fails with rails 2.1
This is a workaround.
Since rails seems to have difficulties to map associations to
Puppet classes, we explain it carefully what to expect.
Changelog
Diffstat (limited to 'lib/puppet/rails/resource.rb')
-rw-r--r-- | lib/puppet/rails/resource.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb index 0053dc28d..eabc873df 100644 --- a/lib/puppet/rails/resource.rb +++ b/lib/puppet/rails/resource.rb @@ -6,12 +6,12 @@ require 'puppet/util/rails/collection_merger' class Puppet::Rails::Resource < ActiveRecord::Base include Puppet::Util::CollectionMerger - has_many :param_values, :dependent => :destroy - has_many :param_names, :through => :param_values + has_many :param_values, :dependent => :destroy, :class_name => "Puppet::Rails::ParamValue" + has_many :param_names, :through => :param_values, :class_name => "Puppet::Rails::ParamName" + + has_many :resource_tags, :dependent => :destroy, :class_name => "Puppet::Rails::ResourceTag" + has_many :puppet_tags, :through => :resource_tags, :class_name => "Puppet::Rails::PuppetTag" - has_many :resource_tags, :dependent => :destroy - has_many :puppet_tags, :through => :resource_tags - belongs_to :source_file belongs_to :host |