# poll.js
def self.check_name(string)
array = normal.select do |ingredient|
string.downcase.include?(ingredient.downcase.pluralize) ||
string.downcase.include?(ingredient.downcase)
end
if array.any?
array.first
else
check_secondary(string)
end
end
# app.js
def other code
I do stuff
end
These are my thoughts!