shallow nesting

Hi Eliot, I think this is all working. take a look!
Yes, I'm getting the error that posts doesn't exist. I don't understand, though, as it's right there! Why doesn't it exist?



> On Oct 18, 2014, at 8:25 AM, Eliot Sykes <notifications@github.com> wrote:
> 
> In app/controllers/comments_controller.rb:
> 
> > @@ -15,8 +15,7 @@ def create
> >    end
> >  
> >    def destroy
> > -    @topic = Topic.find(params[:topic_id])
> > -    @post = @topic.posts.find(params[:post_id])
> > +    @post = posts.find(params[:post_id])
> Try deleting a comment with the app from the shallow-nesting branch. There may be a problem as posts on this line doesn't exist.
> 
> find is available as a class method on Post and all other model classes (e.g. see the old line 18 in this comments_controller which used the Topic.find(...) class method.)
> 
> —
> Reply to this email directly or view it on GitHub.