Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 21, 2015
  1. @budu
  2. @budu
  3. @budu

    Fix issue with chaining multiple pg_search scopes, closes Casecommons…

    budu authored
    # Description
    This patch include two spec examples, one for the simple case of chaining
    scopes and the other for the case where two relations are being merged.
    To fix the first issue, I've expanded on @davearonson solution by using
    an instance variable in the given scope instead of a class variable. To
    prevent polluting the given relation, the code spawn a new relation if
    the variable is missing.
    Using this variable as a counter the pg_search scope pseudo-table is
    aliased with the current count as a suffix if it's not the first
    one. This let us not having to dynamically generate the
    `with_pg_search_rank` method which use the first scope for rank.
    Finally to fix merged relations, the table name is used in the pg_search
    scope pseudo-table aliases.
    # Example
    Given the following AR query:
    > Person.named('foo')
    We'll get the following SQL:
    SELECT "people".*, pg_search_people.rank AS pg_search_rank FROM "people"
    INNER JOIN "houses" ON "houses"."person_id" = "people"."id"
    INNER JOIN <inner query> pg_search_people ON "people"."id" = pg_search_people.pg_search_id
    INNER JOIN <inner query> pg_search_houses ON "houses"."id" = pg_search_houses.pg_search_id
    ORDER BY pg_search_people.rank DESC, "people"."id" ASC,
             pg_search_houses.rank DESC, "houses"."id" ASC
Commits on May 11, 2015
  1. @nertzy
Commits on May 10, 2015
  1. @nertzy

    Merge pull request #233 from mapmeld/inheritance_column

    nertzy authored
    Support STI models using self.inheritance_column
Commits on May 9, 2015
  1. @mapmeld
Commits on May 4, 2015
  1. @nertzy

    Don’t use SQL to rebuild dynamic multisearchable

    nertzy authored
    Iterate over each record with `find_each` instead.
    Fixes #70
Commits on Apr 28, 2015
  1. @doits

    fix #235 and fix tests for #235

    doits authored
    This removes `.where` and `.joins` from the subquery explicitly.
Commits on Apr 25, 2015
  1. @nertzy

    Add failing spec for issue #235

    nertzy authored
Commits on Apr 11, 2015
  1. @mapmeld
Commits on Apr 1, 2015
  1. @nertzy
Commits on Feb 24, 2015
  1. @nertzy

    Address rubocop style error

    nertzy authored
Commits on Feb 23, 2015
  1. @nertzy
  2. @nertzy
  3. @nertzy
Commits on Feb 22, 2015
  1. @nertzy
  2. @ajb @nertzy

    Support chaining before and after select() calls

    ajb authored nertzy committed
  3. @nertzy
  4. @nertzy
  5. @nertzy
  6. @nertzy
  7. @nertzy
Commits on Dec 29, 2014
  1. @nertzy

    Add rubocop to Travis CI build (now default rake)

    nertzy authored
    Also remove bundle update from default rake
  2. @nertzy

    Remove coveralls

    nertzy authored
Commits on Dec 13, 2014
  1. @mrloop
Commits on Dec 12, 2014
  1. @nertzy
  2. @nertzy
  3. @nertzy

    Merge pull request #174 from jobertabma/master

    nertzy authored
    Multiple tsvector support in tsearch
Commits on Dec 9, 2014
  1. @nertzy

    Revert "Merge pull request #201 from Shuttlerock/master"

    nertzy authored
    This reverts commit 61eb1c0, reversing
    changes made to 0b9eba7.
  2. @nertzy

    Merge pull request #201 from Shuttlerock/master

    nertzy authored
    Do not save already destroyed pg_search_document
Commits on Dec 8, 2014
  1. @nertzy
  2. @nertzy
  3. @nertzy

    Merge pull request #118 from derek-watson/master

    nertzy authored
    Implemented simple negated terms
Commits on Dec 1, 2014
  1. @be9

    Do not save already destroyed pg_search_document.

    be9 authored
    This can happen in case of complex associations and callbacks, when
    destroying associated objects results in being called from
    after_destroy hook.
Commits on Sep 5, 2014
  1. @nertzy

    Fix future compatibility with Active Record 4.2

    nertzy authored
    Use Arel::Nodes.build_quoted to quote strings if present, otherwise fall back to preexisting behavior.
Something went wrong with that request. Please try again.