Does "is_any" has a bug in searchlogic? "is_any" used to work fine for me. All of a sudden now, for unknown reasons, when I write for example :attribute_is_any => [1] , the sql output is "where attribute != 1" which is the opposite of what I want of course. Curiously, the problem only occurs when running with a web server (mongrel). I see the problem in the log. But when I go to the console, it works fine, the correct sql output is shown : "where attribute == 1". Basically, the same searchlogic object returns opposite results in the console vs. through the web server. I had to switch to "equals_any" The problem goes away. Is this a bug? Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Mar-06 02:44 UTC
Re: searchlogic is_any needs to be switched to equals_any
On Fri, Mar 5, 2010 at 6:03 PM, Ease Bus <easebus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Does "is_any" has a bug in searchlogic? "is_any" used to work fine > for me. All of a sudden now, for unknown reasons, when I write for > example :attribute_is_any => [1] , the sql output is "where > attribute != 1" which is the opposite of what I want of course. > Curiously, the problem only occurs when running with a web server > (mongrel). I see the problem in the log. But when I go to the > console, it works fine, the correct sql output is shown : "where > attribute == 1". Basically, the same searchlogic object returns > opposite results in the console vs. through the web server. > > I had to switch to "equals_any" The problem goes away. Is this a bug? > Thanks. > >Ease, I would also recommend filing a ticket against this plugin/gem if it''s truly an issue. Next, It''s not clear what version of the gem you''re using or the version of Ruby. Lastly, the feature of the gem may have been deprecated and you''ll need to consult its documentation. -Conrad> -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.