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/has_one_association.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/has_one_association.rb') diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index 312cc1e487..3ff9fe3b9f 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -53,7 +53,8 @@ module ActiveRecord @reflection.klass.find(:first, :conditions => @finder_sql, :order => @reflection.options[:order], - :include => @reflection.options[:include] + :include => @reflection.options[:include], + :readonly => @reflection.options[:readonly] ) end -- cgit v1.2.3