aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/errors.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
-rw-r--r--activerecord/lib/active_record/errors.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb
index f039c23675..04c0fbfe70 100644
--- a/activerecord/lib/active_record/errors.rb
+++ b/activerecord/lib/active_record/errors.rb
@@ -201,12 +201,9 @@ module ActiveRecord
# relation = Task.all
# relation.loaded? # => true
#
- # # where! will try to mutate the relation, but this will fails because it's loaded
- # relation.where!(title: 'TODO')
- # # => ActiveRecord::ImmutableRelation
- #
- # relation.limit!(5)
- # # => ActiveRecord::ImmutableRelation
+ # # Methods which try to mutate a loaded relation fail.
+ # relation.where!(title: 'TODO') # => ActiveRecord::ImmutableRelation
+ # relation.limit!(5) # => ActiveRecord::ImmutableRelation
class ImmutableRelation < ActiveRecordError
end