From 3fd71044487c12080ba3ae39d832f80709ae6c1d Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 13 Jun 2014 16:37:38 +0800 Subject: [PATCH] welcome index obj.includes, routes add school logo --- app/views/welcome/index.html.erb | 2 +- config/routes.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index eb5a1dfd..08d7d13d 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -118,7 +118,7 @@ <% end %>
<% topics = find_new_forum_topics(7) %> - <% topics.each do |topic|%> + <% topics.includes(:forum, :last_reply, :author).each do |topic|%> <% cache "welcome_index_memosActivity_ul_topic_#{topic.id}_li" do %>
  • diff --git a/config/routes.rb b/config/routes.rb index b84885e2..03b437ee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -671,6 +671,7 @@ RedmineApp::Application.routes.draw do get 'school/search_school/', :to => 'school#search_school' post 'school/upload', :to => 'school#upload' + get 'school/upload_logo', :to => 'school#upload_logo' ######added by nie match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'