From f67386e8a0dda4903f6dabd1c6d3fd455fbc62d9 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 7 Dec 2015 10:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A8=A1=E5=9D=97=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E4=BB=A3=E7=A0=81=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index b326051e6..85f57917b 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -37,6 +37,19 @@ class OrganizationsController < ApplicationController @organization = Organization.new render :layout => 'new_base' end + + def edit + @organization = Organization.find(params[:id]) + end + + def destroy + @organization = Organization.find(params[:id]) + @organization.destroy + respond_to do |format| + format.html{ redirect_to admin_organization_path } + end + end + def create @organization = Organization.new @organization.name = params[:organization][:name] @@ -142,6 +155,12 @@ class OrganizationsController < ApplicationController # end end + def cancel_homepage + @org = Organization.find(params[:id]) + @org.home_id = nil + @org.save + end + def autocomplete_search @project = Project.find(params[:project_id]) #@flag = params[:flag] || false