diff options
author | David A. Cuadrado <krawek@gmail.com> | 2008-03-11 16:55:41 -0500 |
---|---|---|
committer | David A. Cuadrado <krawek@gmail.com> | 2008-03-20 16:36:06 -0500 |
commit | 95f6393fe96e214172b9f49edad3227096f383a1 (patch) | |
tree | abe7ffa7092a8302b868ff2bf615b383b4b87080 /app/controllers/projects_controller.rb | |
parent | 4f67c74ea8e0b550949760906523c53d6db53b73 (diff) | |
download | gitorious-mainline-outdated-95f6393fe96e214172b9f49edad3227096f383a1.zip gitorious-mainline-outdated-95f6393fe96e214172b9f49edad3227096f383a1.tar.gz gitorious-mainline-outdated-95f6393fe96e214172b9f49edad3227096f383a1.tar.bz2 |
Implemented user event system
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 5608acd..325cacf 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -46,6 +46,7 @@ class ProjectsController < ApplicationController @project = Project.new(params[:project]) @project.user = current_user if @project.save + Event.from_action_name("create project", current_user, @project.mainline_repository) redirect_to projects_path else render :action => 'new' @@ -64,6 +65,7 @@ class ProjectsController < ApplicationController end @project.attributes = params[:project] if @project.save + Event.from_action_name("update project", current_user, @project.mainline_repository) redirect_to project_path(@project) else render :action => 'new' @@ -77,7 +79,9 @@ class ProjectsController < ApplicationController def destroy @project = Project.find_by_slug!(params[:id]) if @project.can_be_deleted_by?(current_user) + project_title = @project.title @project.destroy + Event.from_action_name("delete project", current_user, nil, project_title) else flash[:error] = "You're not the owner of this project, or the project has clones" end |