Browse Source

Rails3: use Project.visible.find_by_identifier instead of .find for adding watchers dialog on new issue

On Rails 3.0.12, find_project method returns render_404

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9464 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/2.0.0
Toshi MARUYAMA 12 years ago
parent
commit
72ab3e22b1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/controllers/watchers_controller.rb

+ 1
- 1
app/controllers/watchers_controller.rb View File

@@ -109,7 +109,7 @@ private
@watched = klass.find(params[:object_id])
@project = @watched.project
elsif params[:project_id]
@project = Project.visible.find(params[:project_id])
@project = Project.visible.find_by_identifier(params[:project_id])
end
rescue
render_404

Loading…
Cancel
Save