binarylogic / searchlogic

Searchlogic provides object based searching, common named scopes, and other useful tools.

Home Page:http://rdoc.info/projects/binarylogic/searchlogic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tried google groups -- can I do groups with searchlogic and if so, how?

timfong888 opened this issue · comments

I have the following using searchlogic:

@todos = Todo.contact_user_id_is(current_user).
          contact_campaign_id_is(@campaign).
          current_date_lte(Date.today).
          done_date_null.
          ascend_by_current_date

I only want @todos to contain a Todo record for a single contact_id (contact_id is an attribute on Todo).

Question: how can I group so that I there is only one record per contact_id in the @todos array?