diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-10 01:07:04 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-10 01:07:04 +0000 |
commit | 220a64e9b6f7a3745b776c731c8233d6186e2d59 (patch) | |
tree | dad5dfd2e763cf88123ce01acb04e59d8a7043ba /activerecord/test | |
parent | a3e57ad11ece0238849747f22d355747a81eb281 (diff) | |
download | rails-220a64e9b6f7a3745b776c731c8233d6186e2d59.tar.gz rails-220a64e9b6f7a3745b776c731c8233d6186e2d59.tar.bz2 rails-220a64e9b6f7a3745b776c731c8233d6186e2d59.zip |
post.comments.reload returns the association rather than the result of load_target. Closes #10438 [Fred Cheung]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/associations_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 42e3e09187..64dc34066a 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -133,6 +133,13 @@ class AssociationProxyTest < Test::Unit::TestCase assert_nil p.author.reset end + def test_reload_returns_assocition + david = developers(:david) + assert_nothing_raised do + assert_equal david.projects, david.projects.reload.reload + end + end + def setup_dangling_association josh = Author.create(:name => "Josh") p = Post.create(:title => "New on Edge", :body => "More cool stuff!", :author => josh) |