summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-05 08:14:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-05 08:14:21 +0000
commite111e2bc387e6a73e3b2184e0e3bd9250c0ca608 (patch)
tree6362b270df7809040aee6f4fbe85e57d7f55a0e1 /app
parent50b12518a1962c9ca56e2c3d878e86190861b8e5 (diff)
downloadredmine-e111e2bc387e6a73e3b2184e0e3bd9250c0ca608.tar.gz
redmine-e111e2bc387e6a73e3b2184e0e3bd9250c0ca608.zip
Use :only instead of :except option in IssueRelationsController filters.
git-svn-id: http://svn.redmine.org/redmine/trunk@13706 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/issue_relations_controller.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb
index 2ff06c582..fb1298a3c 100644
--- a/app/controllers/issue_relations_controller.rb
+++ b/app/controllers/issue_relations_controller.rb
@@ -16,8 +16,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueRelationsController < ApplicationController
- before_filter :find_issue, :find_project_from_association, :authorize, :only => [:index, :create]
- before_filter :find_relation, :except => [:index, :create]
+ before_filter :find_issue, :authorize, :only => [:index, :create]
+ before_filter :find_relation, :only => [:show, :destroy]
accept_api_auth :index, :show, :create, :destroy
@@ -75,9 +75,11 @@ class IssueRelationsController < ApplicationController
end
end
-private
+ private
+
def find_issue
- @issue = @object = Issue.find(params[:issue_id])
+ @issue = Issue.find(params[:issue_id])
+ @project = @issue.project
rescue ActiveRecord::RecordNotFound
render_404
end