Hmm. It resulted in failures doing it this ways elsewhere. Which is why its
different elsewhere (cause it was arrays or something). I agree it should
be consistent.

Julian Nadeau
Shopify Mobile
On Sep 26, 2013 6:20 PM, "Justin Mutter" <notifications@github.com> wrote:

> In app/controllers/test_runs_controller.rb:
>
> > @@ -3,10 +3,15 @@ class TestRunsController < ApplicationController
> >
> >    def index
> >      if params[:project_id]
> > -      @test_runs = TestRun.where("project_id = ?", params[:project_id])
> > +      if (["updated_at_min", "updated_at_max"] & params.keys).empty?
> > +        @test_runs = TestRun.where("project_id = ?", params[:project_id])
>
> You've implemented this differently than the previous controllers - is
> there a reason? All the other fetch the parent object first, this does it
> inline. I don't really care which way it's done, though I think this way
> will result in less database hits, but we should be consistent.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/joshpc/testasaurus-server/pull/19/files#r6616792>
> .
>