Fixes #135 (projects page incorrectly referring to context page for Sortable drag and drop code, so changes to project sort order were not sticking after a refresh.

Fixed #142 - the 500 error was being generated on dragging projects and contexts to reorder because the order method was looking for an order view and layout. I've added a :render => nothing statement to order now,and that seems to fix the error.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@158 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-10-31 07:52:07 +00:00
parent f39ebf6ec9
commit a948beefee
3 changed files with 4 additions and 2 deletions

View file

@ -80,6 +80,7 @@ class ContextController < ApplicationController
Context.update(id, :position => position + 1)
end
end
render :nothing => true
end
protected

View file

@ -77,6 +77,7 @@ class ProjectController < ApplicationController
Project.update(id, :position => position + 1)
end
end
render :nothing => true
end
protected

View file

@ -8,8 +8,8 @@
<% sortable_options = {
:tag => 'div',
:handle => 'handle',
:complete => visual_effect(:highlight, 'list-contexts'),
:url => {:controller => 'context', :action => 'order'}
:complete => visual_effect(:highlight, 'list-projects'),
:url => {:controller => 'project', :action => 'order'}
}%>
<%= sortable_element 'list-projects', sortable_options %>
<br />