FEATURE: View flags grouped by topic

This commit is contained in:
Robin Ward
2017-09-06 10:21:07 -04:00
parent bbbd974487
commit 40eba8cd93
27 changed files with 347 additions and 79 deletions

View File

@ -1,8 +1,11 @@
module JsonError
def create_errors_json(obj, type = nil)
def create_errors_json(obj, opts = nil)
opts ||= {}
errors = create_errors_array obj
errors[:error_type] = type if type
errors[:error_type] = opts[:type] if opts[:type]
errors[:extras] = opts[:extras] if opts[:extras]
errors
end