port to 2.2 redmine
fixes for rails3 (redmine-2.2)