aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/errors.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-06-22 10:29:32 +0100
committerJon Leighton <j@jonathanleighton.com>2012-06-22 10:29:49 +0100
commit70d3625760aac9994790bd023f1b5060fe1d06c5 (patch)
tree1526059c8616e1dd67f804363d4468b7c8e65d54 /activerecord/lib/active_record/errors.rb
parentbacfa9d1cae4e3cb759ac20193be56923135d7be (diff)
downloadrails-70d3625760aac9994790bd023f1b5060fe1d06c5.tar.gz
rails-70d3625760aac9994790bd023f1b5060fe1d06c5.tar.bz2
rails-70d3625760aac9994790bd023f1b5060fe1d06c5.zip
disallow mutating a relation once loaded
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
-rw-r--r--activerecord/lib/active_record/errors.rb3
1 files changed, 3 insertions, 0 deletions
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