aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-13 01:10:37 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-13 12:00:15 -0700
commite8550ee0329586b32de425e905c7af7e65bc78a8 (patch)
tree0cdfe0f9f0d3fb010280ff0453fc553ab6ff2d92 /activeresource/lib/active_resource/base.rb
parentfa5da8ad54d68ea0484825845eb6f6a8e8bca361 (diff)
downloadrails-e8550ee0329586b32de425e905c7af7e65bc78a8.tar.gz
rails-e8550ee0329586b32de425e905c7af7e65bc78a8.tar.bz2
rails-e8550ee0329586b32de425e905c7af7e65bc78a8.zip
Cherry-pick core extensions
Diffstat (limited to 'activeresource/lib/active_resource/base.rb')
-rw-r--r--activeresource/lib/active_resource/base.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 8a1236c9a8..dc24e713ff 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -1,8 +1,10 @@
+require 'active_support'
require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/core_ext/class/inheritable_attributes'
require 'active_support/core_ext/module/attr_accessor_with_default'
require 'active_support/core_ext/module/delegation'
require 'active_support/core_ext/module/aliasing'
+require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/object/misc'
require 'set'
@@ -1027,7 +1029,7 @@ module ActiveResource
private
# Tries to find a resource for a given collection name; if it fails, then the resource is created
def find_or_create_resource_for_collection(name)
- find_or_create_resource_for(name.to_s.singularize)
+ find_or_create_resource_for(ActiveSupport::Inflector.singularize(name.to_s))
end
# Tries to find a resource in a non empty list of nested modules