Prefer in? Over include? for Readable Conditions

When checking if a value exists within a collection, Ruby’s include? method does the job, but Rails provides a more natural alternative through Active Support’s in? method . Instead of… …reading your conditions backwards with include? : nsync = [ "Justin" , "JC" , "Chris" , "Joey" , "Lance" ] if nsync . include? ( candidate ) puts " #{ candidate } is in the band" end # Or inline if [ "Justin" ,…