#114 new

Search via params not mapping to named scopes

Reported by eric | September 1st, 2009 @ 02:06 PM

First off let me say this plugin is not only ambitious as hell, it's amazing and extremely elegant. Well done!

I am running Rails 2.3.2 and searchlogic 2.3.2.

Given two ways to use searchlogic:

  1. Customer.first_name_like("test")
  2. Customer.search(:first_name_like => "test")

(1) works great. (2) gives me all the records in the database, as if the params are not mapping to their appropriate named scope.

Any ideas where I could look to start troubleshooting this?

Thanks to anyone who can help.


Comments and changes to this ticket

  • eric

    eric October 22nd, 2009 @ 02:41 PM

    • Assigned user cleared.


    Sorry to bother people on this.
    I had a plugin "global_scope" that was preventing me from chaining named_scopes together. This was causing problems of course for the searchlogic plugin, as it uses the hell out of chaining named scopes.

    If you have this same issue, try making sure that you can chain conditional named_scopes together.

    should give you the same results as

    But if your named scopes aren't working properly, you'll notice in your log that the query is only including conditions from the first named scope. Argh!



  • dsaffhhdghdf

    dsaffhhdghdf July 22nd, 2020 @ 06:19 AM

    US Open Tennis 2020 Live Now is the new companion channel to the core US Open Tennis 2020 Live broadcasts. This lifestyle focused show showcases the fan experience on the grounds, behind the scenes stories and interviews. https://usopentennis2020live.com

  • solar panel
  • Marks4sure

    Marks4sure September 2nd, 2020 @ 08:46 AM

    First off let me say this plugin is not only ambitious as hell, it's amazing and extremely elegant. Well done!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket