mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 20:54:03 +00:00
Fix others additional lints
This commit is contained in:
parent
763f864dc9
commit
056fe5ec3f
18 changed files with 33 additions and 34 deletions
|
|
@ -9,7 +9,7 @@ class Datatable
|
|||
@view = view
|
||||
end
|
||||
|
||||
def as_json(options = {})
|
||||
def as_json
|
||||
{
|
||||
sEcho: params[:sEcho].to_i,
|
||||
iTotalRecords: @klass.count,
|
||||
|
|
@ -55,10 +55,10 @@ class Datatable
|
|||
search_for = params[:sSearch].split(' ')
|
||||
terms = {}
|
||||
which_one = -1
|
||||
criteria = search_for.inject([]) do |criteria,atom|
|
||||
criteria = search_for.inject([]) do |mem, atom|
|
||||
which_one += 1
|
||||
terms["search#{which_one}".to_sym] = "%#{atom}%"
|
||||
criteria << "(#{search_cols.map{|col| "#{col} like :search#{which_one}"}.join(' or ')})"
|
||||
mem << "(#{search_cols.map{|col| "#{col} like :search#{which_one}"}.join(' or ')})"
|
||||
end.join(' and ')
|
||||
[criteria, terms]
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue