From 0d8aed82dd6446b94d372b0a1227a46e56eb573c Mon Sep 17 00:00:00 2001 From: Ichiro Yamamoto Date: Thu, 26 Jan 2012 14:40:04 -0700 Subject: [PATCH] Rails 3.2 compatibility --- lib/completeness-fu/active_model_additions.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/completeness-fu/active_model_additions.rb b/lib/completeness-fu/active_model_additions.rb index 3f1a5c9..1e54f03 100644 --- a/lib/completeness-fu/active_model_additions.rb +++ b/lib/completeness-fu/active_model_additions.rb @@ -1,6 +1,11 @@ -require 'active_support/core_ext/class/inheritable_attributes' +if Gem.loaded_specs['activesupport'].version > Gem::Version.create('3.2.0.pre') # ActiveSupport 3.2 + require 'active_support/core_ext/class/attribute' +else # ActiveSupport 3.0, 3.1 + require 'active_support/core_ext/class/inheritable_attributes' +end require 'active_support/core_ext/class/attribute_accessors' + module CompletenessFu module ActiveModelAdditions