1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

update AR::ImmutableRelation documentation [ci skip]

This commit is contained in:
Francesco Rodriguez 2012-10-26 13:40:24 -05:00
parent b1e5c1660b
commit 7a36dc736f

View file

@ -193,6 +193,20 @@ module ActiveRecord
end end
# Raised when a relation cannot be mutated because it's already loaded.
#
# class Task < ActiveRecord::Base
# end
#
# 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
class ImmutableRelation < ActiveRecordError class ImmutableRelation < ActiveRecordError
end end