From 690b0fb08c90196762568fa2fb3a96a250db2270 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 18 Jul 2012 18:54:19 +0000 Subject: Removes calls to link_to_remote. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10037 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/watchers_helper.rb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index e13075533..4fbe4b123 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -30,10 +30,8 @@ module WatchersHelper :action => (watched ? 'unwatch' : 'watch'), :object_type => object.class.to_s.underscore, :object_id => object.id} - link_to_remote((watched ? l(:button_unwatch) : l(:button_watch)), - {:url => url}, - :href => url_for(url), - :class => (watched ? 'icon icon-fav' : 'icon icon-fav-off')) + link_to((watched ? l(:button_unwatch) : l(:button_watch)), url, + :remote => true, :method => 'post', :class => (watched ? 'icon icon-fav' : 'icon icon-fav-off')) end @@ -57,11 +55,8 @@ module WatchersHelper :object_id => object.id, :user_id => user} s << ' ' - s << link_to_remote(image_tag('delete.png'), - {:url => url}, - :href => url_for(url), - :style => "vertical-align: middle", - :class => "delete") + s << link_to(image_tag('delete.png'), url, + :remote => true, :method => 'post', :style => "vertical-align: middle", :class => "delete") end content << content_tag('li', s) end -- cgit v1.2.3