diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-02 17:30:59 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-02 17:30:59 +0000 |
commit | aabf9093a09a825d776b83f7fec6473ad8b75cca (patch) | |
tree | 93eb6544d1b87e7ff7226db389a1fe62eee29e1f /activerecord/test | |
parent | ac58ba60f6cfc272992129ce28808e37391b95d7 (diff) | |
download | rails-aabf9093a09a825d776b83f7fec6473ad8b75cca.tar.gz rails-aabf9093a09a825d776b83f7fec6473ad8b75cca.tar.bz2 rails-aabf9093a09a825d776b83f7fec6473ad8b75cca.zip |
Correct reader method generation for primary key attribute: handle case when primary_key is defined but its column is nil, such as when the model class is backed by a view.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 76f442c71c..04307267b0 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -1079,6 +1079,6 @@ class BasicsTest < Test::Unit::TestCase private def assert_readers(model, exceptions) expected_readers = model.column_names - (model.serialized_attributes.keys + exceptions + ['id']) - assert_equal expected_readers.sort, model.read_methods.keys.sort + assert_equal expected_readers.sort, model.read_methods.to_a.sort end end |