IssueController#new refactored
This commit is contained in:
parent
f789476241
commit
1b83af6eed
|
@ -137,10 +137,10 @@ function updateNewIssueURL(){
|
|||
var assignee_id = $("#assignee_id").val();
|
||||
var new_href = "";
|
||||
if(milestone_id){
|
||||
new_href = "milestone_id=" + milestone_id + "&";
|
||||
new_href = "issue[milestone_id]=" + milestone_id + "&";
|
||||
}
|
||||
if(assignee_id){
|
||||
new_href = new_href + "assignee_id=" + assignee_id;
|
||||
new_href = new_href + "issue[assignee_id]=" + assignee_id;
|
||||
}
|
||||
if(new_href.length){
|
||||
new_href = new_issue_link.attr("href") + "?" + new_href;
|
||||
|
|
|
@ -37,9 +37,7 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@issue = @project.issues.new
|
||||
@issue.milestone_id = params[:milestone_id] if params[:milestone_id].present?
|
||||
@issue.assignee_id = params[:assignee_id] if params[:assignee_id].present?
|
||||
@issue = @project.issues.new(params[:issue])
|
||||
respond_with(@issue)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue