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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:59:52+00:00 2026-05-29T09:59:52+00:00

I am using the active_admin gem and, since it requires the meta_search gem, I

  • 0

I am using the active_admin gem and, since it requires the meta_search gem, I want to provide search functionality outside of the admin pages. I am getting an undefined method error when I provide a string to the Model.search method. According to the meta_search docs, this is all I need to do and all of the active_admin searching works flawlessly. Am I missing something?

Gemfile:

  gem 'activeadmin'
  gem "meta_search",    '>= 1.1.0.pre'

Controller:

  @eventsearch = Event.search(params[:q])

Error message ( example.com/?q=foo ):

  undefined method `stringify_keys!' for "foo":String
  • 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-29T09:59:52+00:00Added an answer on May 29, 2026 at 9:59 am

    The Event#search method expects a Hash where they keys tell it which fields to search (and how) for the associated values. But in your case params[:q] just contains a string ("foo").

    The Getting Started section in [meta_search’s README] will show you what kind of parameters it expects. If, for example, you wanted to search Events’ title fields you would do something like this:

    # Given a URL like this: http://example.com/?title_contains=foo
    # `params` will look like this: { :title_contains => "foo" }
    # so we give `params` directly to the search method:
    
    @events = Event.search params
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the active_admin gem in my Rails 3 application, which has as
I am using the Active Admin gem in my Rails app, and on one
I am using activeadmin gem which is going fine, now i want to add
I just started using Active Admin Gem. I have a little bit of a
We are running a website using Active Server Pages & COM+ components . The
I am using the devise gem for authentication and have the following before_filter in
I'm trying to create a folder using credentials of a limited admin account supplied
The question for those, who had worked with Active Admin gem: I just don't
I started using active admin and I love it! However, for every change I
I was downloading a csv of a model using active admin 0.3.4 that had

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.