diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-17 00:30:53 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-17 00:30:53 +0000 |
commit | 1ae630a40473514254cf14162eae37b7d2330f70 (patch) | |
tree | d0a28fac97d53c8f47869661ec3e1e4e92e62de1 /activerecord/lib/active_record/associations/association_collection.rb | |
parent | 3b9be80a3a6b83156562d218e459822a51d6795c (diff) | |
download | rails-1ae630a40473514254cf14162eae37b7d2330f70.tar.gz rails-1ae630a40473514254cf14162eae37b7d2330f70.tar.bz2 rails-1ae630a40473514254cf14162eae37b7d2330f70.zip |
belongs_to association should always honor a present foreign key and condition interpolation should also be possible on belongs_to
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 334cdccc3d..f4d8be8b0f 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -90,27 +90,6 @@ module ActiveRecord @loaded = true end - protected - def quoted_record_ids(records) - records.map { |record| record.quoted_id }.join(',') - end - - def interpolate_sql_options!(options, *keys) - keys.each { |key| options[key] &&= interpolate_sql(options[key]) } - end - - def interpolate_sql(sql, record = nil) - @owner.send(:interpolate_sql, sql, record) - end - - def sanitize_sql(sql) - @association_class.send(:sanitize_sql, sql) - end - - def extract_options_from_args!(args) - @owner.send(:extract_options_from_args!, args) - end - private def raise_on_type_mismatch(record) raise ActiveRecord::AssociationTypeMismatch, "#{@association_class} expected, got #{record.class}" unless record.is_a?(@association_class) |