Browse files

Require only what is needed from activesupport. (railsjedi)

  • Loading branch information...
1 parent 938e149 commit 3900bbfb320c7f7183f56f48f5dc33de4728e64f @jnunemaker committed Apr 18, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/validatable.rb
View
8 lib/validatable.rb
@@ -1,5 +1,11 @@
+# gem 'activesupport', '2.3.5'
+
+begin
+ require 'active_support/core_ext/object/blank' # newer versions of active_support (>= 3.0)
+rescue LoadError => e
+ require 'active_support/all' # support older versions of active_support (<= 2.3.5)
+end
require 'forwardable'
-require 'active_support/all'
require 'validatable/object_extension'
require 'validatable/errors'

0 comments on commit 3900bbf

Please sign in to comment.