Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rails Engines: wrong documentation #14020

Closed
omsoft opened this Issue · 1 comment

2 participants

@omsoft

Please note an error on this page: http://guides.rubyonrails.org/v3.2.14/engines.html

There is this piece of wrong code, that won't work... :)

schermata 2014-02-11 alle 22 26 45

How you can modify it:

def create
  @post = Post.find(params[:post_id])
  @comment = @post.comments.create(params[:comment])
    flash[:notice] = "Comment was just created!"
  redirect_to @post
end
@carlosantoniodasilva

Thanks, this has been fixed on 4.0+ guides to use comments.create. Please feel free to send a PR with improvements if you still think there's some issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.