diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 72bf693384..8c10ac641b 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -159,6 +159,7 @@ module ActiveRecord :order => @reflection.options[:order], :limit => @reflection.options[:limit], :group => @reflection.options[:group], + :readonly => @reflection.options[:readonly], :include => @reflection.options[:include] || @reflection.source_reflection.options[:include] ) @@ -253,7 +254,9 @@ module ActiveRecord :include => @reflection.options[:include], :select => construct_select, :order => @reflection.options[:order], - :limit => @reflection.options[:limit] } } + :limit => @reflection.options[:limit], + :readonly => @reflection.options[:readonly], + } } end def construct_sql |