added autovalidation (auto_validate! in your ExtendedDocument) and extracted some extlib stuff so we will soon be able to remove the dependency.
This commit is contained in:
parent
e9930c5a86
commit
890b60cae4
18 changed files with 497 additions and 52 deletions
|
@ -75,7 +75,7 @@ module CouchRest
|
|||
# @param <Symbol> field_name the name of the field that caused the error
|
||||
# @param <String> message the message to add
|
||||
def add(field_name, message)
|
||||
(errors[field_name] ||= []) << message
|
||||
(errors[field_name.to_sym] ||= []) << message
|
||||
end
|
||||
|
||||
# Collect all errors into a single list.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue