I have a project model with a name:string and state:integer. There are 5 types of states. For example I want to put all projects with state 3 into the #prospects div. How can I make this work?
appendProject: (project) =>
# this renders all projects
view = new Trackproject.Views.Project(model: project)
@$('#projects').append(view.render().el)
# this is how i want it to work
@$('#prospects').append(state3.render().el)
@$('#upcoming').append(state4.render().el)
I think you can filter it in the collection file but I can’t figure out how to load it into the views.
I work with Rails, Backbone and Coffeescript
Right answer is