Introducing AJAX to a simple project. Too few arguments – format.js

So I have completed [this tutorial](\)) provided by where you set up the article and can then post comments on those articles.

I looked for an article on how to implement AJAX to display new comments (as my goal is to stream Twitter tweets - which I can currently in my terminal) The one I found, which wasn't an exact match was [this one](, where in I treated 'posts' as my comments.

I have completed the tutorial and had to ignore bits such as swapping my 'form_for' to 'form_remote_tag'.

I have attempted to run the application however the first error I have encountered is "Too few arguements" with format.js within this code segment:

def create
@article = Article.find(params[:article_id])
@comment = @article.comments.create(comment_params)
redirect_to article_path(@article)

Within my comments_controller.rb

1 thought on “Introducing AJAX to a simple project. Too few arguments – format.js”

Leave a Comment