I'm trying to paginate with will_paginate in my rails app. I'm following the rails Tutorial by Michael Hartl. In my controller I have
def index
@users = User.paginate(page: params[:page])
end
In my view I have
<%= will_paginate %>
<ul class="users">
<% @users.each do |user| %>
<li>
<%= gravatar_for user, size: 50 %>
<%= link_to user.name, user %>
</li>
<% end %>
</ul>
<%= will_paginate %>
It throws the following error : wrong number of arguments (given 0, expected 1) for will_paginate