From 3b4bf8b99d26cb870ce2e7edb0c5aa7c96471a46 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 5 Mar 2015 14:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E7=BB=87=E7=9A=84in?= =?UTF-8?q?dex=E7=95=8C=E9=9D=A2=EF=BC=8C=E4=BB=A5=E5=8F=8Aindex=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=88=B0=E7=BB=84=E7=BB=87=E9=A6=96=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organization_controller.rb | 10 +++++++ app/controllers/organizations_controller.rb | 6 ---- app/views/organization/index.html.erb | 31 +++++++++++++++++++++ app/views/organizations/index.html.erb | 23 --------------- config/routes.rb | 8 +++--- 5 files changed, 45 insertions(+), 33 deletions(-) create mode 100644 app/controllers/organization_controller.rb delete mode 100644 app/controllers/organizations_controller.rb create mode 100644 app/views/organization/index.html.erb delete mode 100644 app/views/organizations/index.html.erb diff --git a/app/controllers/organization_controller.rb b/app/controllers/organization_controller.rb new file mode 100644 index 000000000..ef0919ced --- /dev/null +++ b/app/controllers/organization_controller.rb @@ -0,0 +1,10 @@ +class OrganizationController < 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)") + @organizations = Organization.all + respond_to do |format| + format.html + end + end +end diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb deleted file mode 100644 index c9cce5752..000000000 --- a/app/controllers/organizations_controller.rb +++ /dev/null @@ -1,6 +0,0 @@ -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 diff --git a/app/views/organization/index.html.erb b/app/views/organization/index.html.erb new file mode 100644 index 000000000..2f657831a --- /dev/null +++ b/app/views/organization/index.html.erb @@ -0,0 +1,31 @@ +