Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Mar 11, 2011
  1. Version bump to 0.3.8

    authored
  2. @francocatena

    Changes in flexible search options

    francocatena authored committed
    Now we can customize the search query with :query => '%{field} LIKE LOWER(%{query})' and the values mask with :mask => '%{value}%'. In this example the generated query is: 'SELECT * FROM models WHERE field_name LIKE LOWER('query_string%') ORDER BY field_name ASC LIMIT 10'
  3. @francocatena

    Added a new option :parameter_operator

    francocatena authored committed
    Usefull when you whant do something like "LIKE LOWER(?)"
  4. @francocatena

    Search with more flexible configuration

    francocatena authored committed
    Now we can add :operator for customize the search operator (defaults to 'LIKE'), :mask for customize the query restriction formar (defaults to '%%%s%') and :column_operator for customize the function applied to the column (defaults to 'LOWER(%s)')
    
    The place holder %s can be used in the :mask and :column_operator arguments to indicate the string place or the column name respectively
    
    For example, if you want to use PostgreSQL full text search:
    
    Model.auto_complete_for_name(:operator => '@@', :mask => 'to_tsquery(%s)', :column_operator => 'to_tsvector(%s)')
    
    This would result in a query like "SELECT * FROM models WHERE to_tsvector(name) @@ to_tsquery('some text') ORDER BY name ASC LIMIT 10"
  5. remove trailing whitespace

    authored
Commits on Feb 3, 2011
  1. Version bump to 0.3.7

    authored
  2. bundle

    authored
  3. who needs changelogs...

    authored
  4. update readme

    authored
Commits on Feb 2, 2011
  1. @francocatena
Commits on Jun 28, 2010
  1. Version bump to 0.3.6

    authored
  2. bugifx

    authored
Commits on Jun 24, 2010
  1. refactor/dry-up add_by_autocomplete code and rename to add_by_auto_mo…

    authored
    …del_attribute for consitency
  2. @oliverbarnes
Commits on Jun 23, 2010
  1. @oliverbarnes
Commits on Jun 15, 2010
  1. @oliverbarnes
Commits on May 12, 2010
  1. Version bump to 0.3.5

    authored
  2. Merge branch 'mergee'

    authored
Commits on May 8, 2010
  1. Version bump to 0.3.4

    authored
  2. add specs for match

    authored
  3. add matches option

    authored
Commits on May 6, 2010
Commits on Apr 14, 2010
Something went wrong with that request. Please try again.