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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:04:28+00:00 2026-05-28T06:04:28+00:00

I am following this tutorial: https://github.com/amatsuda/kaminari/wiki/How-To:-Create-Infinite-Scrolling-with-jQuery So far everything works great, but I am

  • 0

I am following this tutorial:
https://github.com/amatsuda/kaminari/wiki/How-To:-Create-Infinite-Scrolling-with-jQuery

So far everything works great, but I am stuck at the last part of the tutorial.

The content in my show.html.haml gets rendered like this:

- @search_results.each do |search_result|
  =render 'search_result', :search_result=>search_result

The problem is that I have no idea how to translate that to show.js.erb, currently I have (mimicked from the tutorial)

$(".offers").append("<%= escape_javascript(render(@search_results)) %>");

but that throws errors. (undefined method `model_name’ for Hash:Class)

in my controller, search results is defined as:

@search_results =  Kaminari.paginate_array(all_search_results).page(params[:page]).per(6)

all_search_results is an array that gets filled with stuff from another model.

  • 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-28T06:04:29+00:00Added an answer on May 28, 2026 at 6:04 am
    <%= @search_results.map {|search_result| render('search_result.html', :search_result => search_result)}.to_json.html_safe %>
    

    did the trick

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

Sidebar

Related Questions

I've been following the tutorial on the Devise github page here: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address I'm in
I am following this tutorial https://developer.android.com/guide/tutorials/views/hello-tabwidget.html and have completed it. Now I would actually
I'm following this tutorial http://msdn.microsoft.com/en-us/library/bb458038.aspx to create a VsPackage Setup. In the part of
my setup is ubuntu - gitolite - msysgit. After following this tutorial : https://sites.google.com/site/senawario/home/gitolite-tutorial
http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html I am following this as a guide to install subversion. The tutorial at
I've been experimenting with ASP.NET MVC and following this tutorial to create the basic
I'm following a tutorial http://fuelyourcoding.com/getting-started-with-jquery-mobile-rails-3/ transforming the views in a straightforward scaffolded Rails 3
I'm following this tutorial: http://friendlyorm.com/ I'm using InstantRails to run MySQL locally. To run
I am following this tutorial http://www.codeproject.com/KB/cpp/authforwebservices.aspx They have this in the tutorial [SoapHeader(Authentication, Required
I am following this tutorial: http://www.codeproject.com/KB/android/AndroidSQLite.aspx I must be overthinking this SQLite stuff (in

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.