I have a block like this:
Blah.where(....).each do |b|
# Code here
end
I only want to run this if some_var is not nil or empty. Is there a ruby way to do this other than:
if !some_var.nil
Blah.where(....).each do |b|
# Code here
end
end
First of all you might want
instead.
ALSO you can use an
end ifat the end of the block