diff options
author | Brian Lopez <seniorlopez@gmail.com> | 2010-08-02 13:30:08 -0700 |
---|---|---|
committer | Brian Lopez <seniorlopez@gmail.com> | 2010-08-02 13:30:08 -0700 |
commit | 954de9940b8f212cafdb9f5e97abc83d27b3e4ff (patch) | |
tree | 2cc9e60c1967cc217d55dcb187c4bcfc24c44cd5 /activeresource/lib | |
parent | 2353e826b0446917eb655b60c47533f5a9c2a07f (diff) | |
parent | 88b5f938cf7d3eb26ad204451a4dbb9c2cf4f571 (diff) | |
download | rails-954de9940b8f212cafdb9f5e97abc83d27b3e4ff.tar.gz rails-954de9940b8f212cafdb9f5e97abc83d27b3e4ff.tar.bz2 rails-954de9940b8f212cafdb9f5e97abc83d27b3e4ff.zip |
Merge branch 'master' into mysql2
* master:
Bring returning back to ease migration.
Remove duplicated logic.
Eager loading an association should not change the count of children
fix loading of different elements in array then int and string [#5036 state:resolved]
Tidy up previous commit.
test and fix collection_singular_ids= with string primary keys [#5125 state:resolved]
Handle edge cases in the previous patch.
Improved how AppGenerator generates the application name. It now detects the current app name whenever possible. This means that renaming the residing directory will not effect the app name generated by AppGenerator.
ActiveModel::Errors json serialization to work as Rails 3b4 [#5254 state:resolved]
Add missing require in ActiveSupport::HashWithIndifferentAccess [#5189 state:resolved]
Add an internal (private API) after_touch callback. [#5271 state:resolved]
added failing touch propagation test
Makes rails destroy scaffold don't duplicate routes.draw do |map| |map| when using the deprecated syntax
Failing test to check for route file corruption if legacy map parameter is used. [#5263 state:open]
Corrected the rake test:units and test:functionals description [#5251 state:committed]
Use AS::OrderedHash when trusting in the order of the hash
Fix label form helper to use I18n and html options, without the need of 'nil' text param:
Diffstat (limited to 'activeresource/lib')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 72ad2f5872..62420725ad 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -1222,10 +1222,10 @@ module ActiveResource when Array resource = find_or_create_resource_for_collection(key) value.map do |attrs| - if attrs.is_a?(String) || attrs.is_a?(Numeric) - attrs.duplicable? ? attrs.dup : attrs - else + if attrs.is_a?(Hash) resource.new(attrs) + else + attrs.duplicable? ? attrs.dup : attrs end end when Hash |