class OrganizationsController < ApplicationController layout 'project_base' def index @projects = Project.find_by_sql("SELECT * FROM projects WHERE id IN (select MAX(id) from projects GROUP BY enterprise_name)") end end