Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix bug in search after rails 3 upgrade

  • Loading branch information...
commit 687a7c8be2038fceb723c03360e6dc5f79b202ca 1 parent 079b525
@kovacs authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/sortable_table/sortable_core.rb
View
4 lib/sortable_table/sortable_core.rb
@@ -235,9 +235,11 @@ def get_paginated_objects(objects, sort, include_rel, conditions, page, items_pe
def process_search(params, conditions, options)
if !params[:q].blank?
- if options[:search_conditions]
+ if !options[:search_conditions].blank?
conditions = [conditions + " #{options[:search_conditions]}"] + [params[:q]]
else
+ search_type = options[:search_type]
+ search_array = options[:search_array]
search_command = search_type == POSTGRES ? 'ILIKE' : 'LIKE'
search_value = search_type == POSTGRES ? params[:q] : "%#{params[:q]}%"
columns_to_search = ''
Please sign in to comment.
Something went wrong with that request. Please try again.