From a9a4e0d6b8f1c3c08e927a49d213f21931d4071f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 25 Jul 2010 09:29:17 +0000 Subject: [PATCH] Moves code to controller. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3865 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/versions_controller.rb | 3 +++ app/views/versions/show.rhtml | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 05c9743eb..a9470cb85 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -27,6 +27,9 @@ class VersionsController < ApplicationController helper :projects def show + @issues = @version.fixed_issues.find(:all, + :include => [:status, :tracker, :priority], + :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") end def new diff --git a/app/views/versions/show.rhtml b/app/views/versions/show.rhtml index 18bc6bc45..79de5984b 100644 --- a/app/views/versions/show.rhtml +++ b/app/views/versions/show.rhtml @@ -32,13 +32,10 @@ <%= render :partial => 'versions/overview', :locals => {:version => @version} %> <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %> -<% issues = @version.fixed_issues.find(:all, - :include => [:status, :tracker, :priority], - :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") %> -<% if issues.size > 0 %> +<% if @issues.present? %>