RailsCasts Pro episodes are now free!

Learn more or hide this

sekoci's Profile

GitHub User: windaprihatin

Comments by sekoci

Avatar

hai, i have error from kaminari pagination. here is the problem:
undefined method `page' for...
controller
def index
@users = User.order("created_at").page(params[:page]).per(50)

respond_to do |format|
  format.html # index.html.erb
  format.xml  { render :xml => @users }
end

end
view:
<%= paginate @users %>

generate:
rails g kaminari:config
rails g kaminari:views default
I have put gem 'kaminari' in my gemfile.
please help me. thanks you.