aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-05 21:40:53 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-05 21:40:53 -0700
commit2f42433f0a9d777e2a8f5fa05370ba464823933c (patch)
treea9f3321da50ac54140ab40cd7da707fa15171ea1 /activemodel/lib/active_model
parentd4402c5554a0d3202fc22eb38c5c1a8c4b9afd93 (diff)
downloadrails-2f42433f0a9d777e2a8f5fa05370ba464823933c.tar.gz
rails-2f42433f0a9d777e2a8f5fa05370ba464823933c.tar.bz2
rails-2f42433f0a9d777e2a8f5fa05370ba464823933c.zip
Cherry-pick the inflector only
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/core.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/activemodel/lib/active_model/core.rb b/activemodel/lib/active_model/core.rb
index b4b020defc..4201bcf158 100644
--- a/activemodel/lib/active_model/core.rb
+++ b/activemodel/lib/active_model/core.rb
@@ -1,12 +1,3 @@
-begin
- require 'active_support'
-rescue LoadError
- activesupport_path = "#{File.dirname(__FILE__)}/../../../activesupport/lib"
- if File.directory?(activesupport_path)
- $:.unshift activesupport_path
- require 'active_support'
- end
-end
-
-# So far, we only need the string inflections and not the rest of ActiveSupport.
+activesupport_path = "#{File.dirname(__FILE__)}/../../../activesupport/lib"
+$:.unshift(activesupport_path) if File.directory?(activesupport_path)
require 'active_support/inflector'