Class: ActiveRecord::RecordInvalid
- Inherits:
-
ActiveRecordError
- Object
- ActiveRecordError
- ActiveRecord::RecordInvalid
- Includes:
- GetText
- Defined in:
- lib/gettext_activerecord/validations.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#initialize(record) ⇒ RecordInvalid
constructor
A new instance of RecordInvalid.
Methods included from GetText
#update_pofiles, #update_pofiles_org
Constructor Details
#initialize(record) ⇒ RecordInvalid
Returns a new instance of RecordInvalid.
16 17 18 19 20 |
# File 'lib/gettext_activerecord/validations.rb', line 16 def initialize(record) @record = record super(_("Validation failed: %{error_messages}") % {:error_messages => @record.errors..join(", ")}) end |
Instance Attribute Details
#record ⇒ Object (readonly)
:nodoc:
12 13 14 |
# File 'lib/gettext_activerecord/validations.rb', line 12 def record @record end |