Call full_messages_for on model errors instead of on model itself

This commit is contained in:
Michaël Van Damme 2014-09-21 03:51:37 +02:00
parent 29f8f768f1
commit e8041f73e6
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ module SimpleForm
end
def full_errors_on_association
reflection ? object.full_messages_for(reflection.name) : []
reflection ? object.errors.full_messages_for(reflection.name) : []
end
def has_custom_error?