From dfa786631bb8476c8cae555ad8de5e83811dfe9d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 13 Feb 2008 06:32:50 +0000 Subject: Introduce the :readonly option to all associations. Records from the association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/associations/association_proxy.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/association_proxy.rb') diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index d4d3bf7682..9fc0d44a01 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -114,7 +114,8 @@ module ActiveRecord :offset => @reflection.options[:offset], :joins => @reflection.options[:joins], :include => @reflection.options[:include], - :select => @reflection.options[:select] + :select => @reflection.options[:select], + :readonly => @reflection.options[:readonly] ) end -- cgit v1.2.3