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

So I have completed [this tutorial](http://guides.rubyonrails.org/getting_started.html\)) provided by rubyonrails.org 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](http://www.noupe.com/development/create-a-simple-twitter-app.html), 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)
format.js
end

Within my comments_controller.rb

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

Leave a Comment