<% if user == user_enterprises.each do |x|%> <%= user_enterprises %> <% end %> code example Example: ruby each array a = [ "a", "b", "c" ] a.each {|x| print x, " -- " }