I am writing a blog in Rails and am working on the CRUD operations for the posts. I am getting an error when running right now and cannot get to the index. The error is what shows in the title, but here is the full error:
/home/mieds/Documents/Marmelade/app/controllers/posts_controller.rb:34: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
There is the same error with the same file at line 45. Here is the code block shown on the page that is throwing the error:
def update if @post.update(post_params) redirect_to @post, notice: “Update successful” else render ‘edit’ end end
Any ideas on why this is being thrown?
Aucun commentaire:
Enregistrer un commentaire