Exception: ActiveUrl::RecordInvalid

Inherits:
ActiveUrlError show all
Defined in:
lib/active_url/validations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordInvalid

Returns a new instance of RecordInvalid.



4
5
6
7
# File 'lib/active_url/validations.rb', line 4

def initialize(record)
  @record = record
  super("Validation failed: #{@record.errors.full_messages.join(", ")}")
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



3
4
5
# File 'lib/active_url/validations.rb', line 3

def record
  @record
end