diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-03 15:04:03 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-03 15:04:03 +0000 |
commit | c1068bf0cd32df1edf9b1b69e76e30af84692b7c (patch) | |
tree | 5348f3f6cbbb0023581b7d2e202b4cdaa00eac6c /app/controllers | |
parent | 83b4343d2d403a21de4614016e165091e4c5914f (diff) | |
download | redmine-c1068bf0cd32df1edf9b1b69e76e30af84692b7c.tar.gz redmine-c1068bf0cd32df1edf9b1b69e76e30af84692b7c.zip |
Refactor: move method, ProjectsController#reset_activities to ProjectEnumerationsController#destroy.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4054 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/project_enumerations_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/app/controllers/project_enumerations_controller.rb b/app/controllers/project_enumerations_controller.rb index c4b48e476..d63e23641 100644 --- a/app/controllers/project_enumerations_controller.rb +++ b/app/controllers/project_enumerations_controller.rb @@ -15,4 +15,12 @@ class ProjectEnumerationsController < ApplicationController redirect_to :controller => 'projects', :action => 'settings', :tab => 'activities', :id => @project end + def destroy + @project.time_entry_activities.each do |time_entry_activity| + time_entry_activity.destroy(time_entry_activity.parent) + end + flash[:notice] = l(:notice_successful_update) + redirect_to :controller => 'projects', :action => 'settings', :tab => 'activities', :id => @project + end + end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 0670cb1ec..90eddd7b2 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -238,14 +238,6 @@ class ProjectsController < ApplicationController @project = nil end - def reset_activities - @project.time_entry_activities.each do |time_entry_activity| - time_entry_activity.destroy(time_entry_activity.parent) - end - flash[:notice] = l(:notice_successful_update) - redirect_to :controller => 'projects', :action => 'settings', :tab => 'activities', :id => @project - end - private def find_optional_project return true unless params[:id] |