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 7399829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:06:42+00:00 2026-05-29T04:06:42+00:00

I’m following https://github.com/amatsuda/kaminari_example/commits/ajax . I’m using kaminari 0.12.4. (I had check with 0.13.0 and

  • 0

I’m following https://github.com/amatsuda/kaminari_example/commits/ajax. I’m using kaminari 0.12.4. (I had check with 0.13.0 and and does not work). Without ajax does works fine.

I have in users_helper.rb

module UsersHelper
  def link_to_next_page(scope, name, options = {}, &block)
    param_name = options.delete(:param_name) || Kaminari.config.param_name
    link_to_unless scope.last_page?, name, {param_name => (scope.current_page + 1)}, options.merge(:rel => 'next') do
  block.call if block
  end
 end
end

I have in my users_controller the next method:

def followers
 @user = User.find(params[:user])
 @followers = @user.followers_by_type("user")
 @followers = Kaminari.paginate_array(@followers).page(params[:page]).per(1)
respond_to do |format|
  format.js
  format.html { render :layout => 'panel'}# followers.html.erb
  format.json { render json: @followers }
end  

I have in my follower.index.html.erb the next:

<%= render 'followers' %>
<div id="paginator">
<%= link_to_next_page @followers, 'Next Page', :remote => true, :url => { :controller => "users", :action => "followers"} do %>
<span>No More Pages</span>
<% end %>
</div>

I have in partial _followers.html.erb

 <% for followers in @followers%> 
  <div class="followers">
  <%= followers.username %> 
 </div>
  <% end %>

I have in followers.js.erb

//$('#box').html('<%= escape_javascript render(:partial => 'followers') %>');
//$('#box #paginator').html('<%= escape_javascript(paginate(@followers, :remote => true).to_s) %>');
alert ('I am follower.js.erb file');

I have to see a one alert but not seen. Where is the alert? :O. The file index.js.erb does not gets nothing. Where is the problem?

In my log appear working fine the js.erb:

Started GET "/maserranocaceres/followers?page=2" for 127.0.0.1 at 2012-01-31 05:26:44 -0800
  Processing by UsersController#followers as JS
  Parameters: {"page"=>"2", "user_id"=>"maserranocaceres"}
  Rendered users/_followers.html.erb (1.1ms)
  Rendered users/followers.html.erb (28.7ms)
  Completed 200 OK in 38ms (Views: 34.5ms | Solr: 0.0ms)
  • 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-29T04:06:43+00:00Added an answer on May 29, 2026 at 4:06 am

    it might sound a silly suggestion, but i have had issues like this in the past where changing the order of the formats helps, try:

    respond_to do |format|
      format.html { render :layout => 'panel'}# followers.html.erb
      format.json { render json: @followers }
      format.js
    end 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am reading a book about Javascript and jQuery and using one of the

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.