OSDN Git Service

Refactor: add VersionsController#status_by to the resource.
authorEric Davis <edavis@littlestreamsoftware.com>
Fri, 17 Sep 2010 16:11:43 +0000 (16:11 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Fri, 17 Sep 2010 16:11:43 +0000 (16:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4098 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/versions/_issue_counts.rhtml
config/routes.rb

index 4bab5c6..38f3edb 100644 (file)
@@ -5,7 +5,7 @@
        select_tag('status_by',
                    status_by_options_for_select(criteria),
                    :id => 'status_by_select',
-                   :onchange => remote_function(:url => { :action => :status_by, :id => version },
+                   :onchange => remote_function(:url => status_by_project_version_path(version.project, version),
                                                 :with => "Form.serialize('status_by_form')"))) %>
 </legend>
 <% if counts.empty? %>
index 00a2c36..062bb58 100644 (file)
@@ -185,7 +185,7 @@ ActionController::Routing::Routes.draw do |map|
   } do |project|
     project.resource :project_enumerations, :as => 'enumerations', :only => [:update, :destroy]
     project.resources :files, :only => [:index, :new, :create]
-    project.resources :versions, :collection => {:close_completed => :put}
+    project.resources :versions, :collection => {:close_completed => :put}, :member => {:status_by => :post}
   end
 
   # Destroy uses a get request to prompt the user before the actual DELETE request