Nope because I'm not sure if find throws a ActiveRecord::RecordNotFound
error. The exclamation mark makes sure that an error is thrown if no record
is found. If you want to dig in the docs look if find does the same thing
be my guest. But in essence of finding a record it does exactly the same.


On 19 May 2013 10:34, Bas Veeling <notifications@github.com> wrote:

> In app/controllers/admin/review_controller.rb:
>
> > @@ -0,0 +1,96 @@
> > +class Admin::ReviewController < Admin::AdminController
> > +
> > +  def index
> > +    # Get all pending for review challenges
> > +    @challenges = Challenge.pending.decorate
> > +  end
> > +
> > +  def show
> > +  begin
> > +    @challenge = Challenge.pending.find_by_id!(params[:id]).decorate
>
> wouldn't Challenge.pending.find(params[:id]) do the same thing?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/boersmamarcel/challengesplatform/pull/122/files#r4289587>
> .
>