moved from render to init method
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
class ResourceView extends Backbone.View
|
class ResourceView extends Backbone.View
|
||||||
initialize: (opts={}) ->
|
initialize: (opts={}) ->
|
||||||
@auths = opts.auths
|
@auths = opts.auths
|
||||||
if "" is @model.description
|
if "" is @model.description
|
||||||
@model.description = null
|
@model.description = null
|
||||||
|
if @model.description?
|
||||||
|
@model.summary = @model.description
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
methods = {}
|
methods = {}
|
||||||
|
|
||||||
if @model.description?
|
|
||||||
@model.summary = @model.description
|
|
||||||
|
|
||||||
$(@el).html(Handlebars.templates.resource(@model))
|
$(@el).html(Handlebars.templates.resource(@model))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user