:+1: to slice

On 13/09/2013, at 12:03 AM, Henrik Hodne <notifications@github.com> wrote:

> In lib/travis/services/find_build.rb:
> 
> > @@ -30,7 +32,7 @@ def all_resources
> >          end
> >  
> >          def result
> > -          @result ||= scope(:build).find_by_id(params[:id])
> > +          @result ||= scope(:build).where(params.select { |k| ALLOWED_PARAMS.include? k.to_sym } ).first
> That might have to be params.slice(*ALLOWED_PARAMS), now that I think about it.
> 
> —
> Reply to this email directly or view it on GitHub.
>