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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:36:44+00:00 2026-06-18T02:36:44+00:00

Here’s error and my codes. I’m using Kaminari Error: undefined method `model_name’ for #<Array:0x0000001d5abeb0>

  • 0

Here’s error and my codes. I’m using Kaminari

Error:  undefined method `model_name' for #<Array:0x0000001d5abeb0>
73:     <%= page_entries_info(@communities).html_safe %>

view

<%= page_entries_info(@communities).html_safe %>

Community controller

UPDATE* This is how I’m fetching now

    @search = Community.search do  
    fulltext params[:search]
        with(:location_id, params[:location]) if params[:location].to_i >0           
        with(:type_id, params[:type]) if params[:type].to_i >0
        order_by :cached_votes_up, :desc
        paginate :page => params[:page], :per_page => 10
    end

    @communities = @search.results
  • 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-06-18T02:36:45+00:00Added an answer on June 18, 2026 at 2:36 am

    If you are using kaminari and will_paginate together, you will definitely face this error. In short, kaminari and will_paginate are incompatible to each other.

    If you are using rails_admin (which uses kaminari for pagination) and also using will_paginate, you will need to add the following code to one of the initializers under config directory or you can create a new file, let say with name ‘will_paginate’ add the code, and place it into initializers directory.

    if defined?(WillPaginate)
      module WillPaginate
        module ActiveRecord
          module RelationMethods
            def per(value = nil) per_page(value) end
            def total_count() count end
          end
        end
        module CollectionMethods
          alias_method :num_pages, :total_pages
        end
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the view: @if (stream.StreamSourceId == 1) { <img class=source src=@Url.Content(~/Public/assets/images/own3dlogo.png) alt= /> }
Here is the script I'm using, copied directly from Google: <script type=text/javascript> var _gaq
Here is the code I'm using http://jsbin.com/evike5/edit When the jQuery UI dialog is fired
Here's my search array: $aExt = array('png','jpg','gif'); I want to search through the variable:
Here's the setup - I have a view that lists products. On that same
Here is my initial code: $camp_price=array( 'option 1' => array( 'id' => 'June 30
Here is my error(if you need any more info just ask)- Error SQL query:
Here the scenario is I have many .aspx pages if any page gives error,
Here's the two scenarios. We are using a manually built xml soap request with
Here is what I am getting when I use single line comment (using --

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.