Refactor: start to split IssuesController#move into two separate actions.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3918 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-08-06 15:47:27 +00:00
parent e4af6e77a7
commit 041bca6ac9
6 changed files with 23 additions and 18 deletions

View File

@@ -20,7 +20,7 @@ class IssuesController < ApplicationController
default_search_scope :issues
before_filter :find_issue, :only => [:show, :edit, :update, :reply]
before_filter :find_issues, :only => [:bulk_edit, :move, :destroy]
before_filter :find_issues, :only => [:bulk_edit, :move, :perform_move, :destroy]
before_filter :find_project, :only => [:new, :create, :update_form, :preview, :auto_complete]
before_filter :authorize, :except => [:index, :changes, :preview, :context_menu]
before_filter :find_optional_project, :only => [:index, :changes]
@@ -287,6 +287,11 @@ class IssuesController < ApplicationController
end
render :layout => false if request.xhr?
end
# TODO: more descriptive name? move to separate controller like IssueMovesController?
def perform_move
move
end
def destroy
@hours = TimeEntry.sum(:hours, :conditions => ['issue_id IN (?)', @issues]).to_f