Use named routes in controllers.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10981 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-11 17:51:30 +00:00
parent cf66561b1e
commit 0b96094680
13 changed files with 370 additions and 39 deletions
@@ -48,7 +48,7 @@ class IssueRelationsController < ApplicationController
saved = @relation.save
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
format.html { redirect_to issue_path(@issue) }
format.js {
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
}
@@ -67,7 +67,7 @@ class IssueRelationsController < ApplicationController
@relation.destroy
respond_to do |format|
format.html { redirect_to issue_path } # TODO : does this really work since @issue is always nil? What is it useful to?
format.html { redirect_to issue_path(@relation.issue_from) }
format.js
format.api { render_api_ok }
end