For me decide_toggle_display doesn't work any longer on Redmine 1.4.3. I changed the :if parameter of the menu entry in init.rb to Proc.new{ User.current.logged? and User.current.allowed_to?({:controller => 'stealth', :action => 'toggle'}, nil, :global => true) }
Hm, the latest update to 1.4.3 workes fine for me without any additional changes (except the routes.rb file mentioned in the beginning). Did you get a particular error in this codeline?
Maybe it is not a problem with Redmine 1.4 but that I switched to ruby 1.9.3 as well. The error was an Template error but the real culprit was calling the test. I'll give you the exact error message later...
Thanks to @xadh00m for the routing patch. Applying in v0.4.0. I'm also seeing the problem @cs42 notes as I upgrade my installation from Redmine v0.9.0 (!) to v1.4.3, using Ruby 1.9.3-p125. I'm looking into that now.
The second problem is due to a change in the behavior of lambda in Ruby 1.9. In 1.8, lambda Procs ignore it when they are called with undeclared arguments; in 1.9, an error is raised. Fixing in v0.4.0.
After upgrading to 1.4 I encounter the following error:
ActionView::TemplateError (No route matches {:controller=>"stealth", :action=>"toggle"}) on line #30 of app/views/layouts/base.html.erb: 27:
I´ve created a fix following the suggestions from here:http://www.redmine.org/issues/10699#change-37538
Its necessary to add a new file config/routes.rb with the following content:
ActionController::Routing::Routes.draw do |map| map.connect '/stealth/toggle', :controller => 'stealth', :action => 'toggle' end
That fixes the issue.
Thanks, the fix works great. Would be nice if the author could include this file.
For me decide_toggle_display doesn't work any longer on Redmine 1.4.3. I changed the
:if
parameter of the menu entry in init.rb toProc.new{ User.current.logged? and User.current.allowed_to?({:controller => 'stealth', :action => 'toggle'}, nil, :global => true) }
Hm, the latest update to 1.4.3 workes fine for me without any additional changes (except the routes.rb file mentioned in the beginning). Did you get a particular error in this codeline?
Maybe it is not a problem with Redmine 1.4 but that I switched to ruby 1.9.3 as well. The error was an Template error but the real culprit was calling the test. I'll give you the exact error message later...
Ok, as suspected it's a problem with ruby 1.9.3. Using the original test for
:if
results inThe new code seems to work with ruby 1.8.7 and 1.9.3, though.
Thanks to @xadh00m for the routing patch. Applying in v0.4.0. I'm also seeing the problem @cs42 notes as I upgrade my installation from Redmine v0.9.0 (!) to v1.4.3, using Ruby 1.9.3-p125. I'm looking into that now.
The second problem is due to a change in the behavior of lambda in Ruby 1.9. In 1.8, lambda Procs ignore it when they are called with undeclared arguments; in 1.9, an error is raised. Fixing in v0.4.0.