basically I am trying to write an if condition that looks at all the contents of an array to judge whether that condition is true.
Basically, I want to do:
SubScale.all.each do |ss|
if ss.key IN(scales)
execute this code
end
end
Where scales in an array and I want the code to be executed if ss.key is any entry in that array.
You’re looking for
Array#include? :