2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-08-21 19:11:18 +08:00

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