From c6850d8361bbf288cf3adefd087cb9a4bc9c97bc Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 18 Jan 2010 00:03:18 +0530 Subject: Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too. --- activerecord/lib/active_record/relation.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/lib/active_record/relation.rb') diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 7c2a080ead..fc429486e4 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -20,6 +20,8 @@ module ActiveRecord with_create_scope { @klass.new(*args, &block) } end + alias build new + def create(*args, &block) with_create_scope { @klass.create(*args, &block) } end -- cgit v1.2.3