Check if @attributes already exists, just set it if not exists.

This commit is contained in:
Martin Edenhofer 2015-01-11 00:44:40 +01:00
parent 07e5c41092
commit 64bd2ec59d

View file

@ -13,7 +13,8 @@ class App.ControllerForm extends App.Controller
@form = @formGen() @form = @formGen()
if !@model if !@model
@model = {} @model = {}
@attributes = [] if !@attributes
@attributes = []
# if element is given, prepend form to it # if element is given, prepend form to it
if @el if @el