Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:09:48+00:00 2026-05-24T06:09:48+00:00

I am using pjax for main navigation and pagination (kaminari). Within the page I

  • 0

I am using pjax for main navigation and pagination (kaminari). Within the page I make ajax calls to change the state to some of the items on the page. The ajax call updates a partial which contains the pagination. The problem is that after an ajax request, the pjaxified pagination breaks. Instead of showing the links to the next/previous pages, all the links in the pagination is now the same as the last ajax call.

Here’s the template being called after the ajax request, toggle_state.js.erb:

$("#link-list").html("<%= escape_javascript(render 'links') %>")

Here’s the partial ‘links’, being rendered after the ajax call:

<%= render @links %>
<%= paginate @links %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:09:49+00:00Added an answer on May 24, 2026 at 6:09 am

    Forcing some of the parameters set by the ajax request to nil made it work:

    <%= paginate @links, :params => {:controller => 'links', :action => 'index', :id => nil, :toggle_to => nil} %>
    

    It kind of makes sense when you think about it, but I also think there must be a more elegant way to do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using PJAX https://github.com/defunkt/jquery-pjax and I was wondering since the whole page does
I´m planning to make a full dynamic site using pjax, with static menu (only
Hey so I am using Rails PJAX for my web application with twitter bootstrap
I am using YUI in my project, and using its pjax utility, I need
Using Android TelephonyManager an application can obtain the state of data activity over the
Using MVC2 I have an AJAX form which is posting to a bound model.
i'm using the jquery Pjax plugin from Chris Wanstrath, aka, Defunkt, demo'd here: http://pjax.heroku.com
An application of mine uses PJAX style navigation, which means that rather than loading
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
I am using pjax and wanted to use the beforesend call to display a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.