diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-10 15:27:10 -0800 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2010-12-16 01:49:28 +0530 |
commit | 59ec13155581918fe934890ff7d9e6c2c03dc92e (patch) | |
tree | d5766b53b53e079da0787aa12f914f626d62d8bd /activerecord/lib/active_record/associations/class_methods | |
parent | b1447d902c39a4b324cb0dc54b80fecc0fe7e34e (diff) | |
download | rails-59ec13155581918fe934890ff7d9e6c2c03dc92e.tar.gz rails-59ec13155581918fe934890ff7d9e6c2c03dc92e.tar.bz2 rails-59ec13155581918fe934890ff7d9e6c2c03dc92e.zip |
move ivar to initialize, use triple dot rather than minus
Diffstat (limited to 'activerecord/lib/active_record/associations/class_methods')
-rw-r--r-- | activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb index f1b923e98b..c552603097 100644 --- a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb @@ -37,6 +37,7 @@ module ActiveRecord @join_dependency = join_dependency @parent = parent @join_type = Arel::InnerJoin + @aliased_prefix = "t#{ join_dependency.join_parts.size }" # This must be done eagerly upon initialisation because the alias which is produced # depends on the state of the join dependency, but we want it to work the same way @@ -97,7 +98,6 @@ module ActiveRecord private def allocate_aliases - @aliased_prefix = "t#{ join_dependency.join_parts.size }" @aliased_table_name = aliased_table_name_for(table_name) if reflection.macro == :has_and_belongs_to_many |