ruby on rails - will_paginate giving blank pages -


i'm use will_paginate gem in rails application.

controller code:

def index   @posts = guestbook.order('id desc').page(params[:page]).per_page(10)  end 

view code (used foundation gem):

<%= foundation_paginate @posts %> 

everything works fine, if type in address bar room page, blank page displayed (no error messages or redirect first page). tell me how fix it, please. p.s. i'm sorry bad english

you have set will_paginate use array.

in config/initializers/

create new file called will_paginate_extensions.rb

and add this:

require 'will_paginate/array' 

i recommend not use foundation gem using will_paginate, can't receive parameters. ran problem gem made 1 can receive parameters https://github.com/acrogenesis/will_paginate-foundation


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -