`ActionView::Helpers::TextHelper` provides a `cycle` method that is designed to eliminate the need to explicitly use iteration variables for keeping track of which class to use.  See http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html.