shallow nesting

Hi Eliot, I think this is all working. take a look!
See if Post.find works for this, posts is nil, it doesn't have a value.

On Saturday, October 18, 2014, wolframpant <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])
>
> 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?
> … <#149245f1dc495fed_>
>  On Oct 18, 2014, at 8:25 AM, Eliot Sykes <notifications@github.com
> <javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote: In
> app/controllers/comments_controller.rb: > @@ -15,8 +15,7 @@ def create >
> end > > def destroy > - @topic <https://github.com/topic> =
> Topic.find(params[:topic_id]) > - @post <https://github.com/post> =
> @topic.posts.find(params[:post_id]) > + @post <https://github.com/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.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/wolframpant/bloccit/pull/2/files#r19055086>.
>