1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-20 07:21:12 +00:00
redmine/app/views/enumerations/index.api.rsb
Jean-Philippe Lang fa2f598150 Render custom values of enumeration objects in API requests (#22795).
Patch by Jens Kraemer.

git-svn-id: http://svn.redmine.org/redmine/trunk@15812 e93f8b46-1217-0410-a6f0-8f06a7374b81
2016-09-03 07:30:21 +00:00

11 lines
325 B
Plaintext

api.array @klass.name.underscore.pluralize do
@enumerations.each do |enumeration|
api.__send__ @klass.name.underscore do
api.id enumeration.id
api.name enumeration.name
api.is_default enumeration.is_default
render_api_custom_values enumeration.visible_custom_field_values, api
end
end
end