From 70d3625760aac9994790bd023f1b5060fe1d06c5 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 22 Jun 2012 10:29:32 +0100 Subject: disallow mutating a relation once loaded --- activerecord/lib/active_record/errors.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/lib/active_record/errors.rb') diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index 9b88bb8178..858b667e22 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -196,4 +196,7 @@ module ActiveRecord "Unknown primary key for table #{model.table_name} in model #{model}." end end + + class ImmutableRelation < ActiveRecordError + end end -- cgit v1.2.3