diff options
author | mpalmer <mpalmer@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-15 23:07:52 +0000 |
---|---|---|
committer | mpalmer <mpalmer@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-15 23:07:52 +0000 |
commit | 42b78a0689b1a8b108140f5e031ae2ef18a337a2 (patch) | |
tree | a3dc13dea81a210b43e332d86bc405b5aabc3368 /lib | |
parent | e64e64d55a71865de4a14e8e812e361aae8db5c4 (diff) | |
download | puppet-42b78a0689b1a8b108140f5e031ae2ef18a337a2.tar.gz puppet-42b78a0689b1a8b108140f5e031ae2ef18a337a2.tar.xz puppet-42b78a0689b1a8b108140f5e031ae2ef18a337a2.zip |
Use a specific ActiveRecord subclass to check for the proper existence of AR in the Rails feature test, so that we don't kill everything if the machine has Rails installed, but it's an old version that doesn't support polymorphic associations
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2071 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/feature/rails.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/feature/rails.rb b/lib/puppet/feature/rails.rb index 7fe4e327e..238ac2802 100644 --- a/lib/puppet/feature/rails.rb +++ b/lib/puppet/feature/rails.rb @@ -34,7 +34,10 @@ Puppet.features.add(:rails) do end end - if defined? ActiveRecord + # We check a fairly specific class, so that we can be sure that we've + # loaded a new enough version of AR that will support the features we + # actually use. + if defined? ActiveRecord::Associations::BelongsToPolymorphicAssociation require 'puppet/rails' true else |