From 9491781b451d1b14d6eec4eb13bfe80ca5ec7871 Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 20 Nov 2013 15:54:52 +0800 Subject: [PATCH] . --- app/controllers/boards_controller.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 30eeb722c..296fb508c 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -29,12 +29,9 @@ class BoardsController < ApplicationController def index @boards = @project.boards.includes(:last_message => :author).all - # show the board if there is only one - unless @project.project_type == 1 - if @boards.size == 1 - @board = @boards.first - show - end + if @boards.size == 1 + @board = @boards.first + show and return end if @project.project_type == 1 render :layout => 'base_courses'