Metasearch eager loading instead of lazy loading

Hey all,

I have two models, in the first model

Model1.search(nil)

returns the metasearch builder as expected.

for the the second model, the same search(nil) returns every object in
the database (all 60k of them). This obviously isn’t what I want. I
can’t seem to figure out what I did to the model to get it to behave
this way, I have removed all of the code from the model itself and the
behavior is still the same.

Any tips/tricks/ideas would be very helpful.

Thank you,
Brian

On Wed, Mar 30, 2011 at 6:33 AM, PsiPro [email protected] wrote:

can’t seem to figure out what I did to the model to get it to behave
this way, I have removed all of the code from the model itself and the
behavior is still the same.

Can you paste in code pertinent to what you are doing? Sounds like is
not
the case but I would think that somewhere you are calling .all on the
search
if you are getting such a result.

Can you paste in code pertinent to what you are doing? Sounds like is not
the case but I would think that somewhere you are calling .all on the search
if you are getting such a result.

It looks like this issue to me (I posted in there as well)
http://metautonomous.lighthouseapp.com/projects/53012/tickets/59-fetch-all-records-on-form-building

And here is a barebones project I setup to create the same issue:
https://github.com/arjes/meta_search_bug_possibly

If it works in your environment (and isn’t a windows issue) you will
notice that the return from Foo.search(nil) contains all the Foo
records.

Eh nevermind…