How about moving this into helper.rb, inverting the logic, and generalizing it to be able to check for any gem?