On May 24, 5:22 pm, Sam Ginko <[email protected]>
wrote:
> Still not working. I tried
>
> @ allPost = Post.search params[:search], :conditions
> =>["account_status.to_i != ?", 0]
>
> @ allPost = Post.search params[:search], :conditions
> =>"account_status.to_i != 0"
>
Have a look at the documentation for sphinx/thinking sphinx - this
isn't activerecord any more, or SQL. To quote the thinking sphinx
docs:
> Please keep in mind that Sphinx does not support SQL comparison operators –
> it has its own query language. The
> :conditions option must be a hash, with each key a field and each value a
> string.
In addition, :conditions is for doing full text searches against
specific columns you have indexed - for filtering on attribute values
you need to use the :with option.
Fred
> Mk 27 wrote:
> > Looks like I am one step ahead of you Sam, I learned this one yesterday:
>
> >http://www.ruby-forum.com/topic/187676#new
>
> > Look a few posts down for the series of "67 != 67"
>
> > Anyway, the problem is that w/ a HTTP request everything is received as
> > a string. So:
>
> > account_status.to_i
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---