Use boolean comparators where it makes sense
This commit is contained in:
parent
dbdc7ae4aa
commit
118886344a
28 changed files with 60 additions and 60 deletions
|
|
@ -42,7 +42,7 @@ namespace :foodsoft do
|
|||
if tg.has_next_task?
|
||||
create_until = Date.today + FoodsoftConfig[:tasks_upfront_days].to_i + 1
|
||||
rake_say "creating until #{create_until}"
|
||||
while tg.next_task_date.nil? or tg.next_task_date < create_until
|
||||
while tg.next_task_date.nil? || tg.next_task_date < create_until
|
||||
tg.create_next_task
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ end
|
|||
def ask(question, answers = false)
|
||||
puts question
|
||||
input = STDIN.gets.chomp
|
||||
if input.blank? or (answers and !answers.include?(input))
|
||||
if input.blank? || (answers && !answers.include?(input))
|
||||
puts red "Your Input is not valid. Try again!"
|
||||
input = ask(question, answers)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue