Reputation: 581
I am trying to display all my users and want to paginate them I added these two gems :
gem 'paginate', '~> 4.0', '>= 4.0.1'
gem 'bootstrap-will_paginate', '~> 0.0.10'
The following line gives me an error :
@users = User.paginate(page: params[:page])
I have tried @users = User.all.paginate(page: params[:page])
and @users = User.paginate :all, :page => params[:page]
The error is :
You tried to define a scope named "paginate" on the model "ActiveRecord::SchemaMigration", but Active Record already defined a class method with the same name.
any help ?
Upvotes: 0
Views: 213