summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-09 18:57:21 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-09 18:57:21 +0000
commit8d52608dbad63d504ec4b48ffe5ea09cfbe95bd9 (patch)
tree3137b6dfbc50341e9e7945aa8b234a656ce1201d /app
parentbf7476af5b6b2ec70e20254c8f2fe346ca22c089 (diff)
downloadredmine-8d52608dbad63d504ec4b48ffe5ea09cfbe95bd9.tar.gz
redmine-8d52608dbad63d504ec4b48ffe5ea09cfbe95bd9.zip
Refactor: convert the Projects routes to resources.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4071 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/admin/projects.rhtml2
-rw-r--r--app/views/projects/_edit.rhtml2
-rw-r--r--app/views/projects/destroy.rhtml2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/admin/projects.rhtml b/app/views/admin/projects.rhtml
index b37fec57b..6cf933d11 100644
--- a/app/views/admin/projects.rhtml
+++ b/app/views/admin/projects.rhtml
@@ -35,7 +35,7 @@
<%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
- <%= link_to(l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => 'icon icon-del') %>
+ <%= link_to(l(:button_delete), project_destroy_confirm_path(project), :class => 'icon icon-del') %>
</td>
</tr>
<% end %>
diff --git a/app/views/projects/_edit.rhtml b/app/views/projects/_edit.rhtml
index dc667f267..2ecc822df 100644
--- a/app/views/projects/_edit.rhtml
+++ b/app/views/projects/_edit.rhtml
@@ -1,4 +1,4 @@
-<% labelled_tabular_form_for :project, @project, :url => { :action => "update", :id => @project } do |f| %>
+<% labelled_tabular_form_for :project, @project, :url => project_path(@project), :html => {:method => (@project.new_record? ? :post : :put) } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
diff --git a/app/views/projects/destroy.rhtml b/app/views/projects/destroy.rhtml
index 09d7d2a1c..23844ec67 100644
--- a/app/views/projects/destroy.rhtml
+++ b/app/views/projects/destroy.rhtml
@@ -8,7 +8,7 @@
<% end %>
</p>
<p>
- <% form_tag({:controller => 'projects', :action => 'destroy', :id => @project_to_destroy}) do %>
+ <% form_tag(project_path(@project_to_destroy), :method => :delete) do %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete) %>
<% end %>