Closed ivanseidel closed 10 years ago
A few other comments:
error: Server Error (500)
error: { ValidationError: { teamId: [ [Object] ] } }
What do we do about that?
assets/img/loading.gif
, assets/select2/select2-spinner.gif
and a png assets/img/clear.png
. Is it intentional?Other than that it's great!
N
where N is the position.
Notice that it will be inserted in the scores
array, inside the Scores
Model. The structure of scores
is as is follows:scores: {
1: {value: <ComputedValueOfRound>, data:{<ExtraData, such as victims... stored as object>}},
3: {value: <ComputedValueOfRound>, data:{<ExtraData, such as victims... stored as object>}},
4: {value: <ComputedValueOfRound>, data:{<ExtraData, such as victims... stored as object>}},
[...]
}
jQuery
and select2
, that aren't necessary. If we add them problem is solved... better than hacking on the libraryFixed that @mrshu ! It's a problem with the Model... The last commit fixed that (I'm used to have keys as integers, not hashed strings like in MongoDB...)
Can you be more specific? When adding a score row, or setting a team in a score row?
Sorry, you obviously already figured that out -- I can no longer reproduce it. Thanks!
Regarding scores, thanks, I understand it better now.
I'll put some tests together although it's a bit strange that sails has no documentation on it -- in my opinion tests are the only thing that keeps rapid development sane.
The assets (images) should be no longer a problem, I've opened a new pull request for them (see #8).
Regarding this pull request, there is just one think from my side: those functions in the model (like generateTableHeaders
). Once we decide what is best here, I think we can safely merge this in.
The problem occurred when I changed to mongo, that uses Id's as strings not integers, and the Model was using integer...
Think in Sails as just an easy way to get RESTfull API running, with MVC, however, there are full-stack frameworks, but I don't like it very much.... Whatever feature we want to add to it, search as a node.js module, not a Sails one... You will find more useful information I think
the use of 'this' can only be done, because Sails models run methods injecting the global variable as being the same model, allowing us to use 'this' instead of a parameter. Putting it outside the model is only to serve the purpose of organisation. We can change it's place to inside the model, no problem.
Ok then, feel free to merge this in.
Features:
To add: