<% Cohortly::TagConfig.all_groups.each do |group| %> <%= check_box_tag 'cohortly_metric[groups][]', group, params[:cohortly_metric] && params[:cohortly_metric][:groups] && params[:cohortly_metric][:groups].include?(group) %> <% end %>