Class: Reform::Form::Lotus::Errors

Inherits:
Lotus::Validations::Errors
  • Object
show all
Defined in:
lib/reform/form/lotus.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



14
15
16
# File 'lib/reform/form/lotus.rb', line 14

def inspect
  @errors.to_s
end

#merge!(errors, prefix) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/reform/form/lotus.rb', line 6

def merge!(errors, prefix)
  errors.instance_variable_get(:@errors).each do |name, err|
    field = (prefix+[name]).join(".")
    add(field, *err) # TODO: use namespace feature in Lotus here!
  end
  #   next if messages[field] and messages[field].include?(msg)
end

#messagesObject



18
19
20
# File 'lib/reform/form/lotus.rb', line 18

def messages
  self
end