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
1 changed files with 14 additions and 0 deletions

View File

@ -193,6 +193,20 @@ module ActiveRecord
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
end