mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix others additional lints
This commit is contained in:
parent
763f864dc9
commit
056fe5ec3f
18 changed files with 33 additions and 34 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class Ability
|
||||
include CanCan::Ability
|
||||
|
||||
def initialize(user)
|
||||
def initialize(user) # rubocop:disable Lint/UnusedMethodArgument
|
||||
# Define abilities for the passed in user here. For example:
|
||||
#
|
||||
# user ||= User.new # guest user (not logged in)
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ class Conference < ActiveRecord::Base
|
|||
# ====Returns
|
||||
# * +Fixnum+ -> Progress in Percent
|
||||
def calculate_setup_progress(result)
|
||||
(result.select { |k, v| v }.length / result.length.to_f * 100).round(0).to_s
|
||||
(result.select { |_k, v| v }.length / result.length.to_f * 100).round(0).to_s
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
|||
|
|
@ -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