teleological / redmine_stealth

Sometimes sneaky is good. This plugin works like a mute button for Redmine notification emails.
http://teleological.github.com/redmine_stealth
GNU General Public License v2.0
31 stars 35 forks source link

Fix for Redmine 2.3 #28

Open xadh00m opened 11 years ago

xadh00m commented 11 years ago

Hi,

After upgrading redmine to 2.3 the plugin throws a routing exception because the routes syntax has changed. I was able to fix that issue by changing the syntax in config/routes.rb file to:

Rails.application.routes.draw do match '/stealth/toggle', :to => 'stealth#toggle' end else Rails.application.routes.draw do |map| map.connect '/stealth/toggle', :controller => 'stealth', :action => 'toggle', :conditions => { :method => :post } end

This is probably not backward compatible but works fine on redmine 2.3.

R-i-c-k-y commented 11 years ago

sorry, it does not work

Regards

On Tue, Jun 4, 2013 at 2:29 PM, xadh00m notifications@github.com wrote:

Hi,

After upgrading redmine to 2.3 the plugin throws a routing exception because the routes syntax has changed. I was able to fix that issue by changing the syntax in config/routes.rb file to:

Rails.application.routes.draw do match '/stealth/toggle', :to => 'stealth#toggle' end else Rails.application.routes.draw do |map| map.connect '/stealth/toggle', :controller => 'stealth', :action => 'toggle', :conditions => { :method => :post } end

This is probably not backward compatible but works fine on redmine 2.3.

— Reply to this email directly or view it on GitHubhttps://github.com/teleological/redmine_stealth/issues/28 .

mlutfy commented 9 years ago

Thanks @xadh00m for the patch! That fix worked for me, but also needed to replace link_to_remote by link_to, since link_to_remote is removed from Rails 3, which is what I suspect @R-i-c-k-y ran into.

I added those patches in a PR I sent to the project maintainer: https://github.com/teleological/redmine_stealth/pull/32

I have a working branch tested on Redmine 2.5 (Debian Wheezy) available here: https://github.com/mlutfy/redmine_stealth/tree/redmine-2.5

Please test & feedback, I am by no means an expert in Ruby.