0
這應該打印出集合 中的所有內容,但它只打印出兩個元素。在構造函數中打印數組coffeescript
爲什麼不打印出整個列表? 這是一種比賽案例嗎?
class window.Restful
constructor:->
_.each @collection, (action,kind)=>
$('.actions').append "<div>#{action} #{kind}</div>"
class Material extends Restful
namespace: 'admin/api'
table_name: 'materials'
constructor:(@$rootScope,@$http)->
super
collection:
get: 'downloaded'
get: 'incomplete'
get: 'submitted'
get: 'marked'
get: 'reviewed'
get: 'corrected'
get: 'completed'
post: 'sort'
post: 'sort_recieve'
new Material()