diff options
author | VSizov <fk@sphere.com> | 2011-10-15 20:56:53 +0400 |
---|---|---|
committer | VSizov <fk@sphere.com> | 2011-10-15 20:56:53 +0400 |
commit | cb02f1cb82ad424ed6e9845e8654fa17e3c38351 (patch) | |
tree | c430f98daf7e31d730654f486e4db167293887f1 /app/controllers | |
parent | de5d6e95566d4f9a6b673fcf3f95f84a5f96cb85 (diff) |
Sortable issues
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/issues_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f8b4719809b..3e5f2898228 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -69,4 +69,14 @@ class IssuesController < ApplicationController format.js { render :nothing => true } end end + + def sort + @issues = @project.issues.all + @issues.each do |issue| + issue.position = params['issue'].index(issue.id.to_s) + 1 + issue.save + end + + render :nothing => true + end end |