aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-09-10 14:03:19 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-09-10 14:03:19 -0700
commite7facb35eb67836d446283bcb7d15d665b1bb668 (patch)
treebd7c4fb1b66d373321bbe8775cb06979b4a5ed4e /activerecord
parente64b5da550491a94a30e504b85c100e14a461444 (diff)
downloadrails-e7facb35eb67836d446283bcb7d15d665b1bb668.tar.gz
rails-e7facb35eb67836d446283bcb7d15d665b1bb668.tar.bz2
rails-e7facb35eb67836d446283bcb7d15d665b1bb668.zip
add a comment for sanity of other people to come
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
index 712a770133..bb927841ab 100644
--- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
@@ -605,6 +605,10 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
end
def test_join_table_alias
+ # FIXME: `references` has no impact on the aliases generated for the join
+ # query. The fact that we pass `:developers_projects_join` to `references`
+ # and that the SQL string contains `developers_projects_join` is merely a
+ # coincidence.
assert_equal(
3,
Developer.references(:developers_projects_join).merge(
@@ -615,6 +619,10 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
end
def test_join_with_group
+ # FIXME: `references` has no impact on the aliases generated for the join
+ # query. The fact that we pass `:developers_projects_join` to `references`
+ # and that the SQL string contains `developers_projects_join` is merely a
+ # coincidence.
group = Developer.columns.inject([]) do |g, c|
g << "developers.#{c.name}"
g << "developers_projects_2.#{c.name}"