diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-05 21:37:51 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-05 21:37:51 +0000 |
commit | 6fd1a4d502b724d198fd42ee59d8271b7a4f3362 (patch) | |
tree | cd3b74774654059743d75c1cc46daa2a4d6b6836 /activerecord/test/associations_test.rb | |
parent | 7e608af9ffd4fd62d6dca9fd2d4a31d6397f3b4d (diff) | |
download | rails-6fd1a4d502b724d198fd42ee59d8271b7a4f3362.tar.gz rails-6fd1a4d502b724d198fd42ee59d8271b7a4f3362.tar.bz2 rails-6fd1a4d502b724d198fd42ee59d8271b7a4f3362.zip |
Fixed that habtm associations should be able to set :select as part of their definition and have that honored [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index f2a87eec49..42e3e09187 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -1998,6 +1998,12 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase assert_raises(ActiveRecord::ReadOnlyRecord) { david.save! } end + def test_updating_attributes_on_rich_associations_with_limited_find_from_reflection + david = projects(:action_controller).selected_developers.first + david.name = "DHH" + assert_nothing_raised { david.save! } + end + def test_updating_attributes_on_rich_associations_with_limited_find david = projects(:action_controller).developers.find(:all, :select => "developers.*").first |