<% id = "selected_puppetclass_#{klass.id}" css = [dom_class(klass, 'selected'), cycle('even', 'odd')] css << 'unavailable' unless klass.environments.include?(obj.try(:environment).presence || @environment) %> <%= content_tag :li, id: id, class: css do %> <%= link_to_remove_puppetclass(klass, obj) %> <%= hidden_field_tag "#{resource_type}[puppetclass_ids][]", klass.id %> <% end %>