when using external methods that returns an empty hash, incorrect SQL is generated #20

Closed
ohadlevy opened this Issue Mar 8, 2012 · 3 comments

Projects

None yet

3 participants

@ohadlevy
Contributor
ohadlevy commented Mar 8, 2012

using the following definition

scoped_search :in => :search_parameters, :on => :value, :on_key=> :name, :complete_value => true, :rename => :params, :ext_method => :search_by_params, :only_explicit => true


def search_by_params method 
  {}
end

and while combining the search query with another query, the resulting query is something like

LINE 1: ...(("something"."name" = 'xxx') AND ())) ORDER ...

@wvanbergen
Owner

@abenari Any ideas about this?

@abenari abenari added a commit to abenari/scoped_search that referenced this issue Apr 30, 2012
@abenari abenari fixed issue #20 illegal sql when external method return empty condition. c16d385
@abenari
Collaborator
abenari commented Apr 30, 2012

fixed in commit c16d385
will be included in next release 2.3.7

@abenari abenari closed this Apr 30, 2012
@wvanbergen
Owner

Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment