summaryrefslogtreecommitdiffstats
path: root/app/controllers/issue_relations_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-03-16 15:17:47 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-03-16 15:17:47 +0000
commite6c8760ad77a6d4256f11e409734b0501450e588 (patch)
tree7349850d4a56713a097595dc23a0443d45defc14 /app/controllers/issue_relations_controller.rb
parent6b88de1234524faa3beae8b54b2887dbb4a2867c (diff)
downloadredmine-e6c8760ad77a6d4256f11e409734b0501450e588.tar.gz
redmine-e6c8760ad77a6d4256f11e409734b0501450e588.zip
Refactor: Split the find_object methods to prep for a larger refactoring.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3591 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issue_relations_controller.rb')
-rw-r--r--app/controllers/issue_relations_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb
index 9ce358584..7462adca8 100644
--- a/app/controllers/issue_relations_controller.rb
+++ b/app/controllers/issue_relations_controller.rb
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class IssueRelationsController < ApplicationController
- before_filter :find_project, :authorize
+ before_filter :find_issue, :find_project_from_association, :authorize
def new
@relation = IssueRelation.new(params[:relation])
@@ -52,9 +52,8 @@ class IssueRelationsController < ApplicationController
end
private
- def find_project
- @issue = Issue.find(params[:issue_id])
- @project = @issue.project
+ def find_issue
+ @issue = @object = Issue.find(params[:issue_id])
rescue ActiveRecord::RecordNotFound
render_404
end