posts: display validation warnings in flash notice.

This commit is contained in:
evazion
2017-11-25 12:42:09 -06:00
parent b62b16b5a2
commit 07a4bdcb21
5 changed files with 20 additions and 3 deletions

View File

@@ -43,5 +43,9 @@ class ApplicationRecord < ActiveRecord::Base
end
end
def warnings
@warnings ||= ActiveModel::Errors.new(self)
end
include ApiMethods
end