We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
the methods not collecting arguments and forcing match to match 'Jones'
Sorry, something went wrong.
`#
def avg_family_time last_name @coll.find.aggregate([ {:$match=>{:last_name=>"JONES"}}, {:$group=>{:_id=>"$last_name", avg_time:{:$avg=>"$secs"}, numbers:{:$push=>"$number"}}}]) end
def number_goal last_name @coll.find.aggregate([ {:$match=>{:last_name=>"JONES"}}, {:$group=>{:_id=>"$last_name", avg_time:{:$avg=>"$secs"}, numbers:{:$push=>"$number"}}}, {:$unwind=>"$numbers"}, {:$project=>{_id:0, :number=>"$numbers", avg_time:1, last_name:"$_id"}} ]) end `
Wow -- good catch. That hard-coding of "JONE"s and bypassing the provided last_name input parameter does not look right at all.
Likely a copy/paste from the Rails console without editing for use within the method.
I will address -- thanks!
On Mon, Mar 28, 2016 at 10:29 AM, perecullera [email protected] wrote:
`# Lecture 5: $unwind def avg_family_time last_name @coll https://github.com/coll.find.aggregate([ {:$match=>{:last_name=>"JONES"}}, {:$group=>{:_id=>"$last_name", avg_time:{:$avg=>"$secs"}, numbers:{:$push=>"$number"}}}]) end def number_goal last_name @coll https://github.com/coll.find.aggregate([ {:$match=>{:last_name=>"JONES"}}, {:$group=>{:_id=>"$last_name", avg_time:{:$avg=>"$secs"}, numbers:{:$push=>"$number"}}}, {:$unwind=>"$numbers"}, {:$project=>{_id:0, :number=>"$numbers", avg_time:1, last_name:"$_id"}} ]) end ` — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub #3 (comment)
def avg_family_time last_name @coll https://github.com/coll.find.aggregate([ {:$match=>{:last_name=>"JONES"}}, {:$group=>{:_id=>"$last_name", avg_time:{:$avg=>"$secs"}, numbers:{:$push=>"$number"}}}]) end
def number_goal last_name @coll https://github.com/coll.find.aggregate([ {:$match=>{:last_name=>"JONES"}}, {:$group=>{:_id=>"$last_name", avg_time:{:$avg=>"$secs"}, numbers:{:$push=>"$number"}}}, {:$unwind=>"$numbers"}, {:$project=>{_id:0, :number=>"$numbers", avg_time:1, last_name:"$_id"}} ]) end `
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub #3 (comment)
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: