this is Article controller
def index
@articles = Article.all
@articles = Article.paginate(page: params[:page], per_page: 5)
end
views code
<div class="flickr_pagination">
<%= will_paginate @articles, :container => false %>
</div>
<%= render 'article' %>
<div class="flickr_pagination mb-4">
<%= will_paginate @articles, :container => false %>
</div>
Error : ArgumentError in Articles#index Showing C:/Users/Murat/Desktop/Ruby/blog/app/views/articles/index.html.erb where line #4 raised:
wrong number of arguments (given 2, expected 1)
It seems that the error is raised at line 4 of your template, where you call
render 'article'so the problem might be completely unrelated withwill_paginate.