Skip to content

Scoped search 3.0 is out!

This version is all about infrastructure update, see the release notes:

  • Add support for ActiveRecord 4.1
  • Drop support for Ruby 1.8
  • Drop support for ActiveRecord 2.
  • No longer require jQuery UI automatically; you have to do this yourself now.
  • Auto completion: deprecate javascript helpers in favor of asset pipeline.
  • Remove some deprecated 1.x APIs.
  • Upgraded to RSpec 3.
  • Extract Oracle query builder enhancements to plugin gem: github.com/wvanbergen/scoped_search-oracle_enhanced
  • Extract H2 query builder enhancements to plugin gem: github.com/wvanbergen/scoped_search-h2

The complete list of changes can be found here

A brand new scoped_search 2.3.7 just released.

This time we have a new feature many thanks to cj. The new scoped search release now supports syntax similar to SQL IN and NOT IN. It is now possible to write the following syntax:

auth_level ^ (5,7,14)

instead of having to do

auth_level = 5 OR auth_level = 7 OR auth_level = 14

Same goes for:

first_name !^ ('chris', 'peter')

instead of having

first_name != 'chris' and  first_name != 'peter'

Except for the new feature we have one bug fixed in this release.

Many thanks to Ohad Levy for taking the time to report the bugs.

The release is available to download from rubygems.org . Sources can be found in github

scoped_search 2.3.6 released

Yet another bug fixes release is available to download from rubygems.org. Sources can be found in github.

Changes from last release(2.3.5):

  • when external methods create an empty conditions string,  an invalid sql is produced.
  • suggest value completion after operators without typing a space.
  • safer code to prevent possible null pointer exception in the auto completer.

Many thanks to Brad Backingham and Steve Traylen for taking the time to report the bugs.

New scoped search Release – 2.3.5

Another bug fixes release is available to download from rubygems.org. Sources can be found in github.

All the fixed bugs are related to the auto-completer component.

Changes from last release(2.3.4):

  • value and key-name auto completer may produce abiguoes sql.
  • fixed value auto-completer sql exception when single quote is used.
  • fixed value completion after the first quotes.
  • auto-completer fails when query starts with “or “

Many thanks to Brad Backingham,  Eric Helms  and Jeff Weiss  for taking the time to report the bugs.

scoped search 2.3.4 has been released

A new scoped_search bug fixes release is available to download from rubygems.org. Sources can be found in github.

Changes from last release(2.3.3):

Many thanks to Brad Backingham,  Eric Thomas and Tim Speetjens for taking the time to report bugs, and send patches.

New release of scoped_search

A new scoped_search release is available 2.3.3
http://rubygems.org/gems/scoped_search/versions/2.3.3

2.3.2 was skipped by mistake. I made  an error when running the release script.

Changes from last release(2.3.1):

  • Auto-completer results can now be filtered, For usage see:

permission-model-for-the-search

  • Fixed issue with decimal columns

https://github.com/wvanbergen/scoped_search/issues/12

  • Auto completer ajax controller can now pass a filter parameter to the auto-completer method in addition to the search string.

usage:

<%= auto_complete_field_tag_jquery(
:search,
params[:search],
{:placeholder => 'Type Space for Search Options'},
{:filter => 'new filter option'}) %>

Scoped search comparison operators

Scoped search uses ActiveRecord infrastructure to learn about the database schema. The auto-completer uses the column type to suggest the optional operators. Textual fields will have ‘~’ (like), ‘!~’ (unlike), ‘=’ and ‘!=’. Numerical fields will have ‘>’, ‘<‘, ‘>=’, ‘<=’, ‘=’ and ‘!=’. Usualy this is something a developer using scoped search doesn’t need to worry about, scope search find the database column type and suggest the relevant operators, however there could be some cases where a developer will want to limit the operators set for a particular search term.

The syntax to control the auto-completer suggested operator list is to add :operators => { ‘=’, ‘!=’ } to the scoped_search command.

 

Follow

Get every new post delivered to your Inbox.