Filtrar correctamente
This commit is contained in:
parent
6b403a71a3
commit
f6bd9a4dfa
1 changed files with 5 additions and 5 deletions
|
@ -23,10 +23,10 @@ class TelegramJob < ApplicationJob
|
||||||
def find_piratas(ids)
|
def find_piratas(ids)
|
||||||
piratas = Pirata.where.not(telegram_user: nil)
|
piratas = Pirata.where.not(telegram_user: nil)
|
||||||
|
|
||||||
unless ids == 'all'
|
if ids == 'all'
|
||||||
|
piratas
|
||||||
|
else
|
||||||
piratas.where(id: ids)
|
piratas.where(id: ids)
|
||||||
end
|
end
|
||||||
|
|
||||||
piratas
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue