Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

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)

tastes great with trunk and 2-0-stable

  • activerecord/lib/active_record/validations.rb

    old new  
    11module ActiveRecord 
    22  # Raised by save! and create! when the record is invalid.  Use the 
    3   # record method to retrieve the record which did not validate. 
     3  # +record+ method to retrieve the record which did not validate. 
    44  #   begin 
    55  #     complex_operation_that_calls_save!_internally 
    66  #   rescue ActiveRecord::RecordInvalid => invalid 
    77  #     puts invalid.record.errors 
    88  #   end 
    9   class RecordInvalid < ActiveRecordError #:nodoc: 
     9  class RecordInvalid < ActiveRecordError 
    1010    attr_reader :record 
    1111    def initialize(record) 
    1212      @record = record