diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-03 22:47:07 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-03 16:24:32 -0800 |
commit | 2120da7f733ba33183a42e71256db9652c5f5fcc (patch) | |
tree | dc27550f28c65c872d5b5fda8813cacf3746fe1b /activerecord/test/cases | |
parent | 0619dc2319cf839977ea9670a52d9280a1af3595 (diff) | |
download | rails-2120da7f733ba33183a42e71256db9652c5f5fcc.tar.gz rails-2120da7f733ba33183a42e71256db9652c5f5fcc.tar.bz2 rails-2120da7f733ba33183a42e71256db9652c5f5fcc.zip |
ActiveRecord::Relation#primary_key should return a string, just like ActiveRecord::Base.primary_key does.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 4de180880c..5018b16b67 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -810,4 +810,8 @@ class RelationTest < ActiveRecord::TestCase def test_removing_limit_with_options assert_not_equal 1, Post.limit(1).all(:limit => nil).count end + + def test_primary_key + assert_equal "id", Post.scoped.primary_key + end end |