Comments (4)
I've done this before too, but I'd like to avoid it if we can. Do you have a scenario in mind where we would need this?
from hubbub.
I was going to try to convert the owner
objects under each app.Issue
to proper app.User
s, where many issues could share the same owner. Maybe doing that nested model isn't necessary, but we might want to point out having duplicate models is something to watch out for.
from hubbub.
Well right now we can do
var issuesForLogin = app.board.issues.filter(function (issue) {
return issue.get('user').login === 'afeld';
});
to get issues by submitter. If you want issues by owner
var issuesForOwner = app.board.issues.filter(function (issue) {
return issue.repo.get('owner').login === 'afeld';
});
I think these help showcase the underscore collection methods also.
from hubbub.
I like the underscore filter approach.
from hubbub.
Related Issues (20)
- Remove `app.User` HOT 1
- Auto-search after they stop typing HOT 2
- Welcome message disappeared? HOT 3
- tests are broken
- Refactor repo search results to be a Collection HOT 2
- Roto-Rooter the Router
- Rename `bare` branch to `boilerplate` HOT 1
- Remove the "done" category? HOT 2
- childViews? HOT 3
- plugin version
- Make `plugins` branch HOT 3
- 4 buttons instead of the dropdown in the issue modal HOT 2
- Comment consistency HOT 3
- Add Google Analytics to `gh-pages` branch HOT 3
- upgrade to Backbone 1.0.x HOT 5
- filter state not saving HOT 4
- filter state not saving
- some repos only showing a single issue HOT 5
- add link to book
- Getting 404 not found for all repositories HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubbub.