Ticket #10976: remove_nodoc_from_record_invalid_error.diff
| File remove_nodoc_from_record_invalid_error.diff, 0.8 kB (added by kampers, 7 months ago) |
|---|
-
activerecord/lib/active_record/validations.rb
old new 1 1 module ActiveRecord 2 2 # Raised by save! and create! when the record is invalid. Use the 3 # recordmethod to retrieve the record which did not validate.3 # +record+ method to retrieve the record which did not validate. 4 4 # begin 5 5 # complex_operation_that_calls_save!_internally 6 6 # rescue ActiveRecord::RecordInvalid => invalid 7 7 # puts invalid.record.errors 8 8 # end 9 class RecordInvalid < ActiveRecordError #:nodoc:9 class RecordInvalid < ActiveRecordError 10 10 attr_reader :record 11 11 def initialize(record) 12 12 @record = record