aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-02 11:52:37 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-02 11:52:37 -0700
commit3d87c26845095438b6c946dc4e1029280593fb91 (patch)
tree7b342080514fb9d1ff853c4b09f3e874d1cc8a72 /activerecord/test/cases
parentdece005f0a8aa1f4210e381efb429eca5d793d91 (diff)
downloadrails-3d87c26845095438b6c946dc4e1029280593fb91.tar.gz
rails-3d87c26845095438b6c946dc4e1029280593fb91.tar.bz2
rails-3d87c26845095438b6c946dc4e1029280593fb91.zip
push up bind params on "simple" subquery calculations
bind parameters we not being propogated to simple subquery calculation calls. This fixes it
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 2f5c9d6e1b..151edfc6a1 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -43,12 +43,18 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
fixtures :accounts, :categories, :companies, :developers, :projects,
:developers_projects, :topics, :authors, :comments,
:people, :posts, :readers, :taggings, :cars, :essays,
- :categorizations, :jobs
+ :categorizations, :jobs, :tags, :posts
def setup
Client.destroyed_client_ids.clear
end
+ def test_sti_subselect_count
+ tag = Tag.first
+ len = Post.tagged_with(tag.id).limit(10).size
+ assert_operator len, :>, 0
+ end
+
def test_anonymous_has_many
developer = Class.new(ActiveRecord::Base) {
self.table_name = 'developers'