Show RecordInvalid in the documentation. References #10976 [kampers]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Michael Koziarski
2008-02-10 02:49:11 +00:00
parent 5396b0f3b0
commit 2c8fb682cb

View File

@@ -1,12 +1,12 @@
module ActiveRecord
# Raised by save! and create! when the record is invalid. Use the
# record method to retrieve the record which did not validate.
# +record+ method to retrieve the record which did not validate.
# begin
# complex_operation_that_calls_save!_internally
# rescue ActiveRecord::RecordInvalid => invalid
# puts invalid.record.errors
# end
class RecordInvalid < ActiveRecordError #:nodoc:
class RecordInvalid < ActiveRecordError
attr_reader :record
def initialize(record)
@record = record