fix restful controller style issuse
This commit is contained in:
parent
8255653d24
commit
c76657ecb4
1 changed files with 2 additions and 3 deletions
|
@ -147,10 +147,9 @@ module Api
|
|||
search_column = -> (column) { table[column].matches(safe_query) }
|
||||
|
||||
condition = searchable_columns.reduce(nil) do |prev, column|
|
||||
next search_column.(column) if prev.nil?
|
||||
search_column.(column).or(prev)
|
||||
next search_column.call(column) if prev.nil?
|
||||
search_column.call(column).or(prev)
|
||||
end
|
||||
puts collection.where(condition).to_sql
|
||||
collection.where(condition)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue