Brings backward compatibility for the 'allowMultiple' attribute.
This commit is contained in:
valdemon
2014-03-06 12:39:49 +01:00
parent 28ac6f8745
commit 1a346fbf26
4 changed files with 36 additions and 20 deletions

View File

@@ -1,6 +1,12 @@
class ParameterView extends Backbone.View
initialize: ->
Handlebars.registerHelper 'isArray',
(param, opts) ->
if param.type.toLowerCase() == 'array' || param.allowMultiple
opts.fn(@)
else
opts.inverse(@)
render: ->
type = @model.type || @model.dataType
@model.isBody = true if @model.paramType == 'body'