From a5a82d978bd4a46ce73462a0adcb031aa5919ce4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 4 Nov 2005 19:39:50 +0000 Subject: Added extension capabilities to has_many and has_and_belongs_to_many proxies [DHH] Added find_or_create_by_X as a second type of dynamic finder that'll create the record if it doesn't already exist [DHH] Added constrain scoping for creates using a hash of attributes bound to the :creation key [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/associations/association_collection.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activerecord/lib/active_record/associations/association_collection.rb') diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index cbfbdf1541..7ee567e0b4 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -124,14 +124,6 @@ module ActiveRecord end private - def method_missing(method, *args, &block) - if @target.respond_to?(method) or (not @association_class.respond_to?(method) and Class.respond_to?(method)) - super - else - @association_class.constrain(:conditions => @finder_sql, :joins => @join_sql, :readonly => false) { @association_class.send(method, *args, &block) } - end - end - def raise_on_type_mismatch(record) raise ActiveRecord::AssociationTypeMismatch, "#{@association_class} expected, got #{record.class}" unless record.is_a?(@association_class) end -- cgit v1.2.3