Project

General

Profile

Actions

Defect #6674

closed

Delete time log broken after changes to REST

Added by Robert Cigán about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Time tracking
Target version:
Start date:
2010-10-14
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Using a master branch - on the edge

A ActionController::MethodNotAllowed occurred in application#index:

Only get, put, and delete requests are allowed.
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/recognition_optimisation.rb:64:in `recognize_path'

-------------------------------
Request:
-------------------------------

  • URL /time_entries/1569
Actions #1

Updated by Felix Schäfer about 14 years ago

  • Assignee set to Eric Davis
  • Priority changed from High to Normal

If this was in the "timelog" block on "My page", this diff should fix it:

diff --git a/app/views/my/blocks/_timelog.rhtml b/app/views/my/blocks/_timelog.rhtml
index fdff465..e373535 100644
--- a/app/views/my/blocks/_timelog.rhtml
+++ b/app/views/my/blocks/_timelog.rhtml
@@ -40,7 +40,7 @@ entries_by_day = entries.group_by(&:spent_on)
                                            :title => l(:button_edit) %>
         <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
                                              :confirm => l(:text_are_you_sure),
-                                             :method => :post,
+                                             :method => :delete,
                                              :title => l(:button_delete) %>
     <% end -%>
     </td>

If this was not on that page, please specify where you got this error from.

Actions #2

Updated by Eric Davis about 14 years ago

  • Affected version (unused) set to devel

Thanks, I'll look into it.

Actions #3

Updated by Robert Cigán about 14 years ago

Thx, that helped. It does not work in timesheet plugin as well, so you might want to do the fix there as well.

Actions #4

Updated by Eric Davis about 14 years ago

  • Status changed from New to Closed
  • Target version set to 1.1.0
  • Resolution set to Fixed

Fixed in r4259

Actions

Also available in: Atom PDF